Change summary
build.gradle | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
Detailed changes
@@ -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()
+ }
+ }
+
+ }
}