From d0f8d55c9fd2079ce42392ffe11f706a60ddf433 Mon Sep 17 00:00:00 2001 From: Integral Date: Tue, 2 Jan 2024 15:13:58 +0800 Subject: [PATCH 1/2] Add versionCode --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index dcd17995..0b1a3cf9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.15 +version: 1.0.15+1015 environment: sdk: ">=2.19.6 <3.0.0" From 9a9644c3eb8f91d7c25e594b8dc58a080e72c38b Mon Sep 17 00:00:00 2001 From: Integral Date: Tue, 2 Jan 2024 19:10:06 +0800 Subject: [PATCH 2/2] 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 1198b6fc..5e7ef822 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -95,3 +95,14 @@ flutter { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" } + +ext.abiCodes = ["arm64-v8a": 1, "x86_64": 2, "armeabi-v7a": 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 + } + } +}