1
0
Fork 0

Use version name/code override. (#4895)

master
Sebastian Kaspari 2019-08-23 14:08:37 +02:00 committed by Colin Lee
parent 84b0693fd2
commit 35ff0a5110
1 changed files with 5 additions and 0 deletions

View File

@ -165,6 +165,8 @@ android.applicationVariants.all { variant ->
def isDebug = variant.buildType.resValues['IS_DEBUG']?.value ?: false
def useReleaseVersioning = variant.buildType.buildConfigFields['USE_RELEASE_VERSIONING']?.value ?: false
def versionName = Config.releaseVersionName(project)
if (useReleaseVersioning) {
// The Google Play Store does not allow multiple APKs for the same app that all have the
// same version code. Therefore we need to have different version codes for our ARM and x86
@ -192,6 +194,9 @@ android.applicationVariants.all { variant ->
}
println("versionCode for $abi = $versionCodeOverride")
output.versionNameOverride = versionName
output.versionCodeOverride = versionCodeOverride
}
// If this is a release build, validate that "versionName" is set