Skip to content

Commit bcb904e

Browse files
authored
Merge pull request #60 from v2er-app/bugfix/ci-signing-env-vars
fix: Use environment variables for CI/CD signing configuration
2 parents 6dc0ee2 + 8a95796 commit bcb904e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ android {
2929
storePassword GHUI_KEYSTORE_PASSWORD
3030
keyAlias project.hasProperty("GHUI_KEY_ALIAS") ? GHUI_KEY_ALIAS : "ghui"
3131
keyPassword GHUI_KEY_PASSWORD
32-
} else if (project.hasProperty("GHUI_KEYSTORE_PASSWORD") && project.hasProperty("GHUI_KEY_PASSWORD")) {
32+
} else if (System.getenv("GHUI_KEYSTORE_PASSWORD") != null && System.getenv("GHUI_KEY_PASSWORD") != null) {
3333
// CI/CD environment but keystore file might not exist yet
3434
// This prevents the build from failing during configuration phase
3535
storeFile file("keystore.jks")
36-
storePassword GHUI_KEYSTORE_PASSWORD
37-
keyAlias project.hasProperty("GHUI_KEY_ALIAS") ? GHUI_KEY_ALIAS : "ghui"
38-
keyPassword GHUI_KEY_PASSWORD
36+
storePassword System.getenv("GHUI_KEYSTORE_PASSWORD")
37+
keyAlias System.getenv("GHUI_KEY_ALIAS") ?: "ghui"
38+
keyPassword System.getenv("GHUI_KEY_PASSWORD")
3939
} else {
4040
// For local builds without proper signing setup, throw an error
4141
throw new GradleException("Release builds require signing configuration. Please provide GHUI_KEYSTORE_PASSWORD and GHUI_KEY_PASSWORD.")

0 commit comments

Comments
 (0)