fix: make Android signing config conditional on ANDROID_KEYSTORE_PATH #440

Merged
guettlibot merged 1 commits from refs/pull/440/head into main 2026-06-05 09:48:49 +00:00
guettlibot commented 2026-06-05 09:13:54 +00:00 (Migrated from codeberg.org)

Summary

  • BuildAndroidRelease in ci/main.go intentionally builds the AAB without setting up the keystore — the unsigned AAB is later stamped with StampAndroidVersionCode and re-signed by SignAndroidBundle via jarsigner.
  • The old signingConfigs.create("release") block in android/app/build.gradle.kts called error("ANDROID_KEYSTORE_PATH is not set") at Gradle configuration time, which fired even when the keystore wasn't needed for the build step.
  • Fix: guard the signingConfigs block and the signingConfig assignment in the release build type behind a null-check on ANDROID_KEYSTORE_PATH. When the env var is absent (unsigned build path), Gradle skips the signing config entirely; when it is present (e.g. BuildAndroidApk via setupKeystore), the config is created and applied as before.

Test plan

  • Trigger deploy.yml via workflow_dispatch and verify the Build & Deploy to Play Store job no longer fails at step 4 with "ANDROID_KEYSTORE_PATH is not set"
  • Verify BuildAndroidApk (which calls setupKeystore) still produces a correctly signed APK

Closes #439

🤖 Generated with Claude Code

## Summary - `BuildAndroidRelease` in `ci/main.go` intentionally builds the AAB without setting up the keystore — the unsigned AAB is later stamped with `StampAndroidVersionCode` and re-signed by `SignAndroidBundle` via jarsigner. - The old `signingConfigs.create("release")` block in `android/app/build.gradle.kts` called `error("ANDROID_KEYSTORE_PATH is not set")` at Gradle _configuration_ time, which fired even when the keystore wasn't needed for the build step. - Fix: guard the `signingConfigs` block and the `signingConfig` assignment in the release build type behind a null-check on `ANDROID_KEYSTORE_PATH`. When the env var is absent (unsigned build path), Gradle skips the signing config entirely; when it is present (e.g. `BuildAndroidApk` via `setupKeystore`), the config is created and applied as before. ## Test plan - Trigger `deploy.yml` via `workflow_dispatch` and verify the `Build & Deploy to Play Store` job no longer fails at step 4 with "ANDROID_KEYSTORE_PATH is not set" - Verify `BuildAndroidApk` (which calls `setupKeystore`) still produces a correctly signed APK Closes #439 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.