In my opinion, it's fine to just include your monetizing code in your repo. You can use config files or environment variables or something to hide private details. As long as the ads you publish are fairly standard, I don't think anyone would mind - and it also leaves people who really don't like the ads the option to compile an ad-free version. If you really wanted to curry favor, you could even post a separate ad-free .apk release on your repo and just push a version with ads to official app stores.