From e0216e505584a90781424d83d5b7ae3d7c9d8319 Mon Sep 17 00:00:00 2001 From: Pablo Date: Tue, 9 Apr 2024 12:44:39 +0200 Subject: [PATCH] buid release candidate signing config Signed-off-by: Pablo --- .github/workflows/build-release-candidate.yml | 3 ++- app/build.gradle.kts | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-release-candidate.yml b/.github/workflows/build-release-candidate.yml index 885af60097..31f8cbe09f 100644 --- a/.github/workflows/build-release-candidate.yml +++ b/.github/workflows/build-release-candidate.yml @@ -42,7 +42,8 @@ jobs: SIGNING_KEY_ALIAS: ${{ secrets.KEY_ALIAS }} SIGNING_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} SIGNING_STORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} - + SIGNING_KEYSTORE_PATH: 'keystore/dhis_keystore.jks' + - name: Read version name from file working-directory: ./gradle id: read-version diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 80f3d81242..d7d242707a 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -35,6 +35,15 @@ android { } } + signingConfigs { + create("release"){ + keyAlias = System.getenv("SIGNING_KEY_ALIAS") + keyPassword = System.getenv("SIGNING_KEY_PASSWORD") + storeFile = file(System.getenv("SIGNING_KEYSTORE_PATH")) + storePassword = System.getenv("SIGNING_STORE_PASSWORD") + } + } + testOptions { execution = "ANDROIDX_TEST_ORCHESTRATOR" unitTests { @@ -143,6 +152,7 @@ android { getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" ) + signingConfig = signingConfigs.getByName("release") buildConfigField("int", "MATOMO_ID", "1") buildConfigField("String", "BUILD_DATE", "\"" + getBuildDate() + "\"") buildConfigField("String", "GIT_SHA", "\"" + getCommitHash() + "\"") @@ -307,4 +317,4 @@ dependencies { androidTestImplementation(libs.test.compose.ui.test) androidTestImplementation(libs.test.hamcrest) androidTestImplementation(libs.dispatcher.dispatchEspresso) -} +} \ No newline at end of file