From 5d8eeff5021955a7f7c8c0d66e21e864ac0ad17e Mon Sep 17 00:00:00 2001 From: Integral Date: Thu, 13 Jun 2024 00:18:04 +0800 Subject: [PATCH] Add abiCodes --- android/app/build.gradle | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/android/app/build.gradle b/android/app/build.gradle index 5a0e1953b..b556ffd25 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -100,3 +100,14 @@ flutter { } dependencies {} + +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 + } + } +}