Created
March 5, 2014 06:57
-
-
Save robUx4/9362439 to your computer and use it in GitHub Desktop.
Output the APK in a "builds" folder outside of the source tree with specific names between buildtypes and versionCodes
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 -> | |
if (variant.buildType.name == "release") { | |
variant.outputFile = new File(projectDir.parent + "/builds", archivesBaseName + "-" + versionName + ".apk") | |
} else if (variant.buildType.name == "kindle") { | |
variant.outputFile = new File(projectDir.parent + "/builds", "Kindle-" + versionName + ".apk") | |
} else { | |
variant.outputFile = new File(projectDir.parent + "/builds", archivesBaseName + "-" + variant.buildType.name + versionCode + ".apk") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment