Skip to content

Commit

Permalink
Merge pull request #89 from bibo38/master
Browse files Browse the repository at this point in the history
  • Loading branch information
phanan authored Aug 16, 2023
2 parents 1116645 + 2986757 commit e3305a7
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,19 @@ flutter {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

// Change version codes of split APKs to be together
// By default they are increments of 1000, e.g. when the versionCode is 19, then 1019 is is ARMv7a, 2019 is ARM64 v8a, 3019 is x86 and 4019 is x64
// We change it to 190 for a non split apk, 191 for ARMv7a, 192 for AARM64 v8a, 193 for x86 and 194 for x64
ext.abiCodes = ["armeabi-v7a": 1, "arm64-v8a": 2, "x86": 3, "x86_64": 4]
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) {
// Probably a non-split APK
abiVersionCode = 0
}
output.versionCodeOverride = variant.versionCode * 10 + abiVersionCode
}
}
File renamed without changes.
File renamed without changes

0 comments on commit e3305a7

Please sign in to comment.