Forked from keyboardsurfer/flavor_names_build.gradle
Created
January 31, 2017 12:08
-
-
Save firemaples/1586c10f01a9fdb9eb869b0ff83da1c6 to your computer and use it in GitHub Desktop.
Version names for application variants
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android { | |
applicationVariants.all { variant -> | |
def flavor = variant.mergedFlavor | |
def name = flavor.getVersionName() | |
def versionName = name + '-' + variant.properties.get('flavorName') | |
if (variant.buildType.isDebuggable()) { | |
versionName += '-debug'; | |
} | |
flavor.versionName = versionName; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment