Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.

Commit dbaf771

Browse files
committed
Fix ABI version code for fdroid support
1 parent d557aa6 commit dbaf771

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

android/app/build.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,15 @@ flutter {
9494
dependencies {
9595
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
9696
}
97+
98+
99+
ext.abiCodes = ["armeabi-v7a": 1, "arm64-v8a": 2, "x86_64": 4]
100+
import com.android.build.OutputFile
101+
android.applicationVariants.all { variant ->
102+
variant.outputs.each { output ->
103+
def abiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
104+
if (abiVersionCode != null) {
105+
output.versionCodeOverride = variant.versionCode * 10 + abiVersionCode
106+
}
107+
}
108+
}

0 commit comments

Comments
 (0)