correct build config

This commit is contained in:
Arne 2023-04-04 19:32:35 +02:00
parent 8d1837921d
commit 17a98fbcc8
3 changed files with 11 additions and 1 deletions

View file

@ -119,7 +119,7 @@ android {
targetSdkVersion 32
//versionNameSuffix " beta_(2023-01-10)" // " beta_(XXXX-XX-XX)" // activate for beta versions
versionCode 13005
versionCode 130
versionName "1.6.3"
//resConfigs "en"
@ -226,5 +226,15 @@ android {
disable 'ExtraTranslation', 'MissingTranslation', 'InvalidPackage', 'MissingQuantity', 'AppCompatResource', 'RestrictedApi'
error 'StringFormatInvalid', 'StringFormatMatches'
}
android.applicationVariants.all { variant ->
variant.outputs.each { output ->
def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(com.android.build.OutputFile.ABI))
if (baseAbiVersionCode != null) {
output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + baseAbiVersionCode
} else {
output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + grgit.log(includes: ["HEAD"], excludes: [tags.last()]).size()
}
}
}
}