Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e12bd00

Browse files
committedApr 8, 2024
match abi versioning to fdroid
1 parent ba474e3 commit e12bd00

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed
 

‎android/app/build.gradle

+11-1
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,14 @@ flutter {
6969
source '../..'
7070
}
7171

72-
dependencies {}
72+
ext.abiCodes = ["armeabi-v7a": 1, "arm64-v8a": 2, "x86_64": 3]
73+
74+
import com.android.build.OutputFile
75+
android.applicationVariants.all { variant ->
76+
variant.outputs.each { output ->
77+
def abiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
78+
if (abiVersionCode != null) {
79+
output.versionCodeOverride = variant.versionCode * 10 + abiVersionCode
80+
}
81+
}
82+
}

‎android/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
buildscript {
2-
ext.kotlin_version = '1.9.23'
2+
ext.kotlin_version = '1.8.22'
33
repositories {
44
google()
55
mavenCentral()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:8.3.1'
9+
classpath 'com.android.tools.build:gradle:7.4.2'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}
@@ -18,14 +18,14 @@ allprojects {
1818
}
1919
}
2020

21-
rootProject.buildDir = "../build"
21+
rootProject.buildDir = '../build'
2222
subprojects {
2323
project.buildDir = "${rootProject.buildDir}/${project.name}"
2424
}
2525
subprojects {
26-
project.evaluationDependsOn(":app")
26+
project.evaluationDependsOn(':app')
2727
}
2828

2929
tasks.register("clean", Delete) {
3030
delete rootProject.buildDir
31-
}
31+
}

‎android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip

0 commit comments

Comments
 (0)
Please sign in to comment.