Skip to content

Instantly share code, notes, and snippets.

@bingzer
Last active December 20, 2015 09:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save bingzer/6107359 to your computer and use it in GitHub Desktop.
Android Gradle Build: Create apk name with its versioning. i.e: MyAppName-1.1.1-release.apk
android {
...
applicationVariants.each { variant ->
def apk = variant.outputFile
def name = apk.getName().replace('.apk', versionName + '.apk');
variant.outputFile = new File(apk.parentFile, name);
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment