Merge pull request #378 from Integral-Tech/versionCode-added

Add versionCode
This commit is contained in:
guozhigq
2024-01-07 21:09:01 +08:00
committed by GitHub
2 changed files with 12 additions and 1 deletions

View File

@ -95,3 +95,14 @@ flutter {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
ext.abiCodes = ["arm64-v8a": 1, "x86_64": 2, "armeabi-v7a": 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
}
}
}

View File

@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.16
version: 1.0.16+1016
environment:
sdk: ">=2.19.6 <3.0.0"