Last active
September 3, 2015 07:01
-
-
Save mortenjust/97155d1143647fe7fc22 to your computer and use it in GitHub Desktop.
Add versioncode to apk filename android
This file contains hidden or 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 { ... | |
// defaultconfig ... | |
applicationVariants.all { variant -> | |
variant.outputs.each { output -> | |
def file = output.outputFile | |
output.outputFile = new File(file.parent, file.name.replace(".apk", "-" + variant.versionCode+ ".apk")) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment