title: Android - change app version name based on flavor
body: <p>I want to change the app <code>versionName</code> to whatever is defined in the AndroidManifest file for the specific flavor I'm building.</p>
  
  <p>So if I'm only building one of the 4 defined flavors I have, like:<br>
      gradle assembleFlavor1Debug</p>
  
  <p>I was expecting <code>Flavor1</code> to have the same version name as the one defined for its specific manifest (because of the merging of manifest files), but that's not happening.</p>
  
  <p>How can I know, during build time, which specific flavor is being built?<br>
  Because if I know what flavor is being run,<br>
  I can extract the respective <code>versionName</code> from the manifest and set it on <code>android.defaultConfig.versionName</code>,<br>
  which solves my problem.</p>