1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Generate Android versionCode from Major.Minor.Patch (#14963)

This commit is contained in:
rubenwardy 2024-08-21 19:25:18 +01:00 committed by GitHub
parent 1bccb4e48c
commit 6cc0452503
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 47 deletions

View file

@ -8,7 +8,7 @@ android {
compileSdk 34
targetSdkVersion 34
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
versionCode project.versionCode
versionCode versionMajor * 1000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild
}
buildFeatures {
@ -116,18 +116,6 @@ clean {
delete new File("src/main/assets", "Minetest.zip")
}
// Map for the version code that gives each ABI a value.
import com.android.build.OutputFile
def abiCodes = ['armeabi-v7a': 0, 'arm64-v8a': 1]
android.applicationVariants.all { variant ->
variant.outputs.each {
output ->
def abiName = output.getFilter(OutputFile.ABI)
output.versionCodeOverride = abiCodes.get(abiName, 0) + variant.versionCode
}
}
dependencies {
implementation project(':native')
implementation 'androidx.appcompat:appcompat:1.6.1'