From 89f44a62c4f91cf85f3ddd8d2bd74241da6ccf25 Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Tue, 6 Aug 2024 06:43:40 +0200 Subject: [PATCH] fdroid abi version code --- app/android/app/build.gradle | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/android/app/build.gradle b/app/android/app/build.gradle index 7016c464..3192c03d 100644 --- a/app/android/app/build.gradle +++ b/app/android/app/build.gradle @@ -74,4 +74,16 @@ android { flutter { source = "../.." +} + +//Override version code for f-droid +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 + } + } } \ No newline at end of file