From 7a6bf09f3427eb48ad8a7dcfaa2ff923bb1b3806 Mon Sep 17 00:00:00 2001 From: Myzel394 <50424412+Myzel394@users.noreply.github.com> Date: Wed, 9 Aug 2023 19:26:06 +0200 Subject: [PATCH] fix: Improve Android version code --- android/app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 13f5746a..214becaf 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -59,7 +59,7 @@ android { targetSdkVersion rootProject.ext.targetSdkVersion compileSdkVersion rootProject.ext.compileSdkVersion multiDexEnabled true - versionCode flutterVersionCode.toInteger() + versionCode = (flutterVersionCode.toInteger() * 10) + 5000 versionName flutterVersionName } @@ -104,7 +104,7 @@ android.applicationVariants.all { variant -> def abiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI)) if (abiVersionCode != null) { // Add `4024` as there was a conflict when upgrading from 10.2 to 10.3 - output.versionCodeOverride = 4024 + (variant.versionCode * 10 + abiVersionCode) + output.versionCodeOverride = variant.versionCode + abiVersionCode } } }