Skip to content
Snippets Groups Projects
Unverified Commit 094b29ba authored by Matthias Urhahn's avatar Matthias Urhahn Committed by GitHub
Browse files

Don't show the RC/VERSION_BUILD extension in the versionName on non-tester builds. (#1394)

parent 42ddd0d8
No related branches found
No related tags found
No related merge requests found
...@@ -45,15 +45,15 @@ android { ...@@ -45,15 +45,15 @@ android {
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 29 targetSdkVersion 29
versionCode ( versionCode(
VERSION_MAJOR.toInteger() * 1000000 VERSION_MAJOR.toInteger() * 1000000
+ VERSION_MINOR.toInteger() * 10000 + VERSION_MINOR.toInteger() * 10000
+ VERSION_PATCH.toInteger() * 100 + VERSION_PATCH.toInteger() * 100
+ VERSION_BUILD.toInteger() + VERSION_BUILD.toInteger()
) )
println("Used versionCode: $versionCode") println("Used versionCode: $versionCode")
versionName "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-RC${VERSION_BUILD}" versionName "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}"
println("Used versionName: $versionName") println("Used versionName: $versionName")
testInstrumentationRunner "testhelpers.TestApplicationUIRunner" testInstrumentationRunner "testhelpers.TestApplicationUIRunner"
...@@ -130,6 +130,14 @@ android { ...@@ -130,6 +130,14 @@ android {
def flavor = variant.productFlavors[0] def flavor = variant.productFlavors[0]
def typeName = variant.buildType.name // debug/release def typeName = variant.buildType.name // debug/release
variant.buildConfigField "String", "ENVIRONMENT_TYPE_DEFAULT", "\"${flavor.envTypeDefault[typeName]}\"" variant.buildConfigField "String", "ENVIRONMENT_TYPE_DEFAULT", "\"${flavor.envTypeDefault[typeName]}\""
if (flavor.name == "deviceForTesters") {
def adjustedVersionName = "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-RC${VERSION_BUILD}"
variant.outputs.each { output ->
output.versionNameOverride = adjustedVersionName
}
println("deviceForTesters adjusted versionName: $adjustedVersionName")
}
} }
buildFeatures { buildFeatures {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment