diff --git a/.github/workflows/build-release-candidate.yml b/.github/workflows/build-release-candidate.yml index 885af60097f..31f8cbe09f5 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 80f3d81242e..d7d242707aa 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