From 0fce840ac70e1b7e524ea7ab3a17a173dc75d2fa Mon Sep 17 00:00:00 2001 From: Gray Zhang Date: Mon, 21 Jul 2025 09:53:34 +0800 Subject: [PATCH] fix: Make release signing configuration non-blocking for CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove exception throwing during configuration phase - Set empty defaults for signing credentials to allow gradle configuration - This fixes CI failures for dependabot PRs that don't have access to secrets - Release builds will still fail naturally if credentials are missing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- app/build.gradle | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 68b18d3f..b43dd831 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -24,15 +24,10 @@ android { release { // Release signing requires environment variables to be set // The keystore will be decoded from KEYSTORE_BASE64 in CI/CD - if (System.getenv("KEYSTORE_PASSWORD") != null && System.getenv("KEY_PASSWORD") != null) { - storeFile file("keystore.jks") - storePassword System.getenv("KEYSTORE_PASSWORD") - keyAlias System.getenv("KEY_ALIAS")?.trim() ?: "ghui" - keyPassword System.getenv("KEY_PASSWORD") - } else { - // Release builds require proper environment variables - throw new GradleException("Release builds require signing configuration. Please set KEYSTORE_PASSWORD and KEY_PASSWORD environment variables.") - } + storeFile file("keystore.jks") + storePassword System.getenv("KEYSTORE_PASSWORD") ?: "" + keyAlias System.getenv("KEY_ALIAS")?.trim() ?: "ghui" + keyPassword System.getenv("KEY_PASSWORD") ?: "" } }