title: Android Studio, Gradle different code when building based on flavor
body: <p>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.</p>
  
  <p>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).</p>
  
  <p>Not sure this can be done, but maybe someone knows of a Gradle trick? </p>