Repository navigation
Keep the web client ID in release builds (1.1.1) - #66
Merged
Merged
Conversation
AuthRepositoryFirebase reads default_web_client_id by name, which the resource shrinker enabled in #52 cannot see. It removed the string, so release builds showed "Google sign-in isn't set up yet" and could not sign in. keep.xml now keeps it. The release workflow refuses to publish an APK without the string, and a unit test fails if google-services.json lacks the web client. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ships the Google sign-in fix to phones on 1.1.0 through the in-app updater. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
In the v1.1.0 release, Google sign-in fails with "Google sign-in isn't set up yet - enable the Google provider in the Firebase console, then rebuild." The Firebase setup is fine: Google is enabled.
AuthRepositoryFirebasereadsR.string.default_web_client_idby name (Resources.getIdentifier), so it compiles before Google sign-in is configured. The resource shrinker I enabled in #52 can't see that lookup, so it removed the string from release builds:aapt2 dump resourceson the publishedPoolTrack-1.1.0.apkshowsgoogle_app_id,google_api_key, … but nodefault_web_client_id.build/generated/res/processReleaseGoogleServices, and then shrunk away.My R8 check in #52 only inspected classes, not resources. Sorry.
Change
res/raw/keep.xmlwithtools:keep="@string/default_web_client_id". That file isn't packaged itself.assembleRelease, it refuses to publish if the APK has nodefault_web_client_id.GoogleSignInConfigTest: fails ifgoogle-services.json, local or in the CI secret, lacks the web client, so a stale file is caught on a PR rather than on a phone.1.1.1, so phones on 1.1.0 are offered the fix by the in-app updater. The update prompt shows above the sign-in screen, so a phone that can't sign in can still update.Verification
assembleReleasenow containsstring/default_web_client_id../gradlew ktfmtCheck checkis running locally, and CI will run on this PR.After merging
Tag
v1.1.1on the merge commit. Phones on 1.1.0 will get the update prompt on their next launch.🤖 Generated with Claude Code