I am wondering if there is a mechanism to allow different source code to be pulled in for different flavors at build time. We have a large number of white labels, branded for their user base, and the problem is that Google Play will not allow code that allows updates (replaces) the APK. We actually don't allow that via an internal code check, but Google scanner is too stupid to see that - it only knows there is code that can update an APK.
So to get around this I want to be able to have two bases of source code, one with the updater code (for customers who don't want to use Google Play) and another without the updater (which customers can push to Google Play without problems). I want these source codes in only two spots, since to put it in each flavor would be a maintenance nightmare (with +100 flavors).
Not sure this can be done, but maybe someone knows of a Gradle trick?
I think you should have a look at Gradle Flavor Dimensions.
This seems like a good article to start wtih: article link