Last active
December 20, 2015 09:19
-
-
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
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.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