Skip to content

Commit

Permalink
Update build.gradle split the abis
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmlg authored Oct 5, 2023
1 parent 71dc03f commit 989fa87
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,14 @@ flutter {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

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
}
}
}

0 comments on commit 989fa87

Please sign in to comment.