Created
May 13, 2018 13:54
-
-
Save pratheepchowdhary/d1834738ae9fc710547327064f5a312a to your computer and use it in GitHub Desktop.
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
import com.android.build.OutputFile | |
android { | |
splits { | |
//... | |
} | |
// Map for the version code that gives each ABI a value. | |
def abiCodes = ['x86':1, 'x86_64':2, 'armeabi-v7a':3, 'arm64-v8a':4] | |
// APKs for the same app that all have the same version information. | |
android.applicationVariants.all { variant -> | |
// Assigns a different version code for each output APK. | |
variant.outputs.each { | |
output -> | |
def abiName = output.getFilter(OutputFile.ABI) | |
output.versionCodeOverride = abiCodes.get(abiName, 0) * 100000 + variant.versionCode | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment