title: How to have multiple configurations for a single Android build Product Flavour when assembling with Gradle?
body: <p>I have a project in Android Studio with two Product Flavours.  They're effectively identical except for a few hard-coded values in them, e.g. URLs, ids and whether to activate some additional functionality.</p>
  
  <p>I'd like to be able to just have one flavour and move these hard-coded values out to some kind of config/properties file which the now generic code could read or pre-load on startup as needed.  I'd then like to have some kind of gradle command that creates the different APKs using the different config/properties file.</p>
  
  <p>That way, if I wish to create another configuration for the app (a combination of the properties I mentioned above), I don't have to go copying (and maintaining) another Product Flavour to do this.</p>
  
  <p>It'd be great if this could all be done in Android Studio and not the command line also.  Can someone tell me of a way to do this please?</p>
  
  <p>A command-line solution may also be acceptable, but it would ideally have to be Operating System independent as some of our developers work on MACs while others work on PCs.</p>
  
  <p>I and other Android developers around me looked into this ourselves.  But we couldn't find anything within the gradle framework that allowed the kind of flexibility I've outlined.</p>
  
  <p>Outside of pre-configured android parameters that can be set in build.gradle, we couldn't find anything where we could configure properties of our own that would affect the build.  </p>
  
  <p>The only solution we could see it to have duplicate Product Flavours with the hard-coded values changed to the new configuration we want.  We'd like to avoid this at all costs.</p>