Created
May 23, 2017 07:20
-
-
Save NickJian/389490207a4ba516535629b03dcd7678 to your computer and use it in GitHub Desktop.
split apk- build version code setting
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 -> | |
variant.outputs.each { output -> | |
// Stores the value of ext.abiCodes that is associated with the ABI for this variant. | |
def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI)) | |
// Assigns a different version code for each output APK other than the universal APK. | |
if (baseAbiVersionCode != null) { | |
output.versionCodeOverride = baseAbiVersionCode * 1000 + variant.versionCode | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment