Use a fixed release keystore for Android signing (CI signs with ephemeral debug keys) (#300)#301
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThis PR implements a complete Android release signing infrastructure for stable, project-owned key management across all CI/CD pipelines. A new composite GitHub Action ( Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/android/app/build.gradle.kts`:
- Around line 44-61: The signingConfigs block currently only checks
hasKey("releaseStoreFile") / hasKey("devStoreFile") before creating configs;
update it to validate all four required properties (releaseStoreFile,
releaseStorePassword, releaseKeyAlias, releaseKeyPassword for the "release"
config and devStoreFile, devStorePassword, devKeyAlias, devKeyPassword for
"devRelease") by calling keystoreProperties.getProperty(...) or hasKey(...) for
each property before calling create("release") / create("devRelease"); if any
property is missing or blank, avoid creating the config and fail-fast with a
clear Gradle-friendly error (or log and throw GradleException) so the failure
points to the missing keystore property instead of a later signing error.
In `@docs/RELEASES.md`:
- Around line 174-175: The docs currently instruct using "apksigner verify
--print-certs" for AABs which is APK-specific; update the RELEASES.md text
around the cd-app.yml / jeeves-<version>.aab guidance to state that apksigner
cannot verify .aab files and to instead verify the certificate SHA-256 using
keytool -printcert -jarfile jeeves-<version>.aab (include that command as the
recommended local verification step for AABs downloaded from the release), and
keep the existing note that cd-app.yml automatically runs the APK verification
step.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: fbd0424f-5bb2-4ff2-bdf6-3b3eed2ff4ef
📒 Files selected for processing (7)
.github/actions/setup-android-signing/action.yml.github/workflows/cd-app.yml.github/workflows/flutter-ci.yml.github/workflows/pr-apk.ymlNOTES.mdapp/android/app/build.gradle.ktsdocs/RELEASES.md
…fy docs (#issue-300) - Require all four properties (storeFile, storePassword, keyAlias, keyPassword) per signing config before creating it, so a hand-edited local key.properties with a partial section fails fast at config time instead of producing a less-obvious null-keystore error at sign time. - Fix RELEASES.md AAB verification: apksigner is APK-only, so direct AAB verification at `keytool -printcert -jarfile`. Refs: - #301 (comment) - #301 (comment)
|
Review comments addressed. Commit |
Summary
setup-android-signingcomposite action that decodes base64-encoded release and/or dev keystores from secrets, validates that all four credentials (keystore, password, alias, key password) are present for each flavor, and writesapp/android/key.properties; supportsrequire-release=trueto fail fast on prod CD when secrets are missing instead of silently shipping a debug-signed artifact.cd-app.yml'sbuild-androidandbuild-seekerjobs withrequire-release: 'true'so production APK/AAB and the Seeker APK are signed with the project-owned release key on every run.apksigner verify --print-certsso any fingerprint drift (wrong key loaded, misconfigured secrets) is visible in the job log.app/android/app/build.gradle.ktsso released artifacts now have a stable SHA-256 fingerprint, unblocking in-place upgrades for Firebase App Distribution drops, GitHub Releases, and the Seeker/dApp Store APK.Test plan
cd-app.ymltwice and confirmapksigner verify --print-certs build/app/outputs/flutter-apk/app-production-release.apkreports the same SHA-256 certificate fingerprint across both runs.build-seekerreports the same fingerprint as the production APK.ANDROID_RELEASE_KEYSTORE_BASE64in a test run and verifycd-app.ymlfails fast at the "Set up Android signing" step with therequire-release=trueerror rather than producing a debug-signed artifact.key.properties, runflutter run --releaseand confirm it still builds via the debug-signing fallback.🤖 Generated with Claude Code
Closes #300