From 83249964a822fb34c01e4da4964596d5e93c24d9 Mon Sep 17 00:00:00 2001 From: mytja Date: Thu, 14 Dec 2023 15:30:03 +0100 Subject: [PATCH] change how build numbering works --- tarok/android/app/build.gradle | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tarok/android/app/build.gradle b/tarok/android/app/build.gradle index a7ee9b1..90d111c 100644 --- a/tarok/android/app/build.gradle +++ b/tarok/android/app/build.gradle @@ -82,3 +82,14 @@ flutter { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" } + +ext.abiCodes = ["x86_64": 1, "armeabi-v7a": 2, "arm64-v8a": 3] +import com.android.build.OutputFile +android.applicationVariants.all { variant -> + variant.outputs.each { output -> + def abiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI)) + if (abiVersionCode != null) { + output.versionCodeOverride = variant.versionCode * 10 + abiVersionCode + } + } +}