mirror of
https://github.com/Ujwal223/FocusGram.git
synced 2026-11-20 10:53:56 +01:00
build: assign unique versionCodes for ABI split APKs (3001, 3002, 3003)
This commit is contained in:
1 parent
293a45382a
commit
99daedb13c
1 file changed
+16
@@ -163,6 +163,22 @@ android {
|
||||
unitTests.isReturnDefaultValues = true
|
||||
}
|
||||
|
||||
val abiVersionCodes = mapOf("armeabi-v7a" to 1, "arm64-v8a" to 2, "x86_64" to 3)
|
||||
|
||||
androidComponents {
|
||||
onVariants { variant ->
|
||||
variant.outputs.forEach { output ->
|
||||
val abi = output.filters.find {
|
||||
it.filterType == com.android.build.api.variant.FilterConfiguration.FilterType.ABI
|
||||
}?.identifier
|
||||
val suffix = abiVersionCodes[abi]
|
||||
if (suffix != null) {
|
||||
output.versionCode.set((defaultConfig.versionCode ?: 300) * 10 + suffix)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
applicationVariants.all {
|
||||
val variant = this
|
||||
outputs.all {
|
||||
|
||||
Reference in new issue
Block a user