diff --git a/build.gradle b/build.gradle index a2caf893840df0302d9e603053133408852f1943..5523135847616be46a4df960d5d2618b38e2e6a9 100644 --- a/build.gradle +++ b/build.gradle @@ -149,7 +149,7 @@ android { defaultConfig { minSdkVersion 23 targetSdkVersion 34 - versionCode 4205708 + versionCode 42025 + tags.size() versionName grgit.describe(always: true) applicationId "eu.siacs.conversations" def appName = "Conversations" @@ -317,4 +317,16 @@ android { buildFeatures { buildConfig true } + + android.applicationVariants.configureEach { 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() + } + } + + } }