feat(example-connect): add automated Android release signing setup#2304
Open
gimenete-stripe wants to merge 1 commit intomasterfrom
Open
feat(example-connect): add automated Android release signing setup#2304gimenete-stripe wants to merge 1 commit intomasterfrom
gimenete-stripe wants to merge 1 commit intomasterfrom
Conversation
Adds automated configuration for Android release signing that persists across `expo prebuild` runs. This solves the issue of losing signing configuration when regenerating the Android directory. Changes: - Add `.signing/` directory to store keystore files outside of android/ - Add `setup-android-signing.js` script to automatically restore signing - Add `postprebuild` hook to run setup after expo prebuild - Add versionCode management to app.json - Add comprehensive ANDROID_SIGNING.md documentation - Update .gitignore to protect signing credentials The setup script: - Copies keystore files from .signing/ to android/ - Patches build.gradle with release signing configuration - Updates .gitignore to prevent credential leaks Version management: - Added versionCode to app.json for Play Store versioning - Documented workflow for bumping versions between releases Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Committed-By-Agent: claude
Contributor
maragues-stripe
left a comment
There was a problem hiding this comment.
Thanks! 1 comment and 1 general suggestion.
I suggest to skip copying credential files, and point to the .signing folder from build.gradle. It simplifies the script, and it's a perfectly valid gradle approach, I'd swear.
Comment on lines
+111
to
+113
| 1. Place your keystore files in `.signing/`: | ||
| - `upload-keystore.jks` | ||
| - `keystore.properties` |
Contributor
There was a problem hiding this comment.
How does a developer get these files?
Google play requires that future versions are signed with the same certificate.
Contributor
Author
There was a problem hiding this comment.
I have those in a 1password vault. I'm trying to see how can I share them to other stripes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds automated Android release signing configuration that persists across
expo prebuildruns. The setup includes:expo prebuildapp.jsonMotivation
The example-stripe-connect app uses Expo, which regenerates the
android/directory when runningexpo prebuild. This causes several issues:build.gradleare deletedversionCodefor Play Store releasesThis PR solves all these issues with an automated setup that runs after every
expo prebuild.Changes
New Files:
.signing/- Directory to store keystore files outside ofandroid/(protected by .gitignore)scripts/setup-android-signing.js- Automated setup script that:.signing/toandroid/build.gradlewith release signing configuration.gitignoreto protect credentialsANDROID_SIGNING.md- Comprehensive documentation including:Modified Files:
package.json- Addedsetup-android-signingscript andpostprebuildhookapp.json- AddedversionCode: 2for Play Store versioning.gitignore- Protected signing credentials from gitWorkflow
After this PR, the Android release workflow is:
The
postprebuildhook automatically runs the setup script, so signing configuration is always correct.Testing
expo prebuild→ signing automatically restoredyarn setup-android-signingDocumentation
ANDROID_SIGNING.mdwith:.signing/README.mdexplaining directory contents