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

Calculate the apps versionName and versionCode (EXPOSUREAPP-2772) (#1393)

* Remove URLs from gradle.properties they are now read via `prod_environment.json`

* Calculate app versionName and versionCode from gradle major/minor/patch/build variables.
parent 4ed675c8
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,11 @@ def environmentExtractor = { File path ->
}
android {
println("Current VERSION_MAJOR: ${VERSION_MAJOR}")
println("Current VERSION_MINOR: ${VERSION_MINOR}")
println("Current VERSION_PATCH: ${VERSION_PATCH}")
println("Current VERSION_BUILD: ${VERSION_BUILD}")
compileSdkVersion 29
buildToolsVersion "29.0.3"
......@@ -39,8 +44,17 @@ android {
applicationId 'de.rki.coronawarnapp'
minSdkVersion 23
targetSdkVersion 29
versionCode 47
versionName "1.5.0"
versionCode (
VERSION_MAJOR.toInteger() * 1000000
+ VERSION_MINOR.toInteger() * 10000
+ VERSION_PATCH.toInteger() * 100
+ VERSION_BUILD.toInteger()
)
println("Used versionCode: $versionCode")
versionName "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-RC${VERSION_BUILD}"
println("Used versionName: $versionName")
testInstrumentationRunner "testhelpers.TestApplicationUIRunner"
......
......@@ -16,8 +16,8 @@ org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"
android.useAndroidX=true
org.gradle.parallel=true
org.gradle.dependency.verification.console=verbose
# Variables for Server URLs. The variables in local.properties will override these
SUBMISSION_CDN_URL=https://submission.coronawarn.app
DOWNLOAD_CDN_URL=https://svc90.main.px.t-online.de
VERIFICATION_CDN_URL=https://verification.coronawarn.app
PUB_KEYS_SIGNATURE_VERIFICATION=MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEc7DEstcUIRcyk35OYDJ95/hTg3UVhsaDXKT0zK7NhHPXoyzipEnOp3GyNXDVpaPi3cAfQmxeuFMZAIX2+6A5Xg==
\ No newline at end of file
# Versioning, this is used by the app & pipelines to calculate the current versionCode & versionName
VERSION_MAJOR=1
VERSION_MINOR=6
VERSION_PATCH=0
VERSION_BUILD=1
\ No newline at end of file
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