Skip to content

Commit

Permalink
buid release candidate signing config
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo <[email protected]>
  • Loading branch information
Balcan committed Apr 9, 2024
1 parent 6876d36 commit e0216e5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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() + "\"")
Expand Down Expand Up @@ -307,4 +317,4 @@ dependencies {
androidTestImplementation(libs.test.compose.ui.test)
androidTestImplementation(libs.test.hamcrest)
androidTestImplementation(libs.dispatcher.dispatchEspresso)
}
}

0 comments on commit e0216e5

Please sign in to comment.