-
Notifications
You must be signed in to change notification settings - Fork 477
[xdl] Do not override google-services.json contents since SDK37 #1897
Conversation
00d81d5
to
7354b70
Compare
Codecov Report
@@ Coverage Diff @@
## master #1897 +/- ##
=======================================
Coverage 60.77% 60.77%
=======================================
Files 84 84
Lines 2598 2598
Branches 719 719
=======================================
Hits 1579 1579
Misses 996 996
Partials 23 23 Continue to review full report at Codecov.
|
@sjchmiela, First of all, thnkz for addressing this issue, lot of people depend on this feature. But can can you please eleborate on this a bit more in detail in the scenario that a build is made with SDK 36 Before this issues was raised, I did not have the extra code in my app.json for the google.service.json. I mean this snippet of code: "android": { But after the moment issues where raised that pushtoken was no longer set for standalone apps. there was a suggestion that adding the above code would fix the problem, so I did. Question: When building with SDK 36 do we still need to add the above extra snippet of code, even when before it was not there and everything worked just fine. Or do we now always need to add this extra code snippit to the app.json file.? Your answer is much appreciated |
#209) <!-- Thanks for contributing to _turtle_! Before you submit your pull request, please make sure to check the following boxes by putting an x in the [ ] (don't: [x ], [ x], do: [x]) --> ### Checklist - [x] I've read the [Contribution Guidelines] (https://github.com/expo/turtle/blob/master/CONTRIBUTING.md). - [x] I've updated the [CHANGELOG](https://github.com/expo/turtle/blob/master/CHANGELOG.md) if necessary. - [x] I've ensured the unit and smoke tests are still passing - either by running `yarn test:unit` and `yarn test:smoke:[ios|android]` or by checking the appropriate CircleCI builds' statuses. - [x] **I've manually tested whether the changes I made work as expected.** ### Motivation and Context - `google-services.json` was being handled unintuitively, fixed with expo/expo-cli#1897 - Expo Client's secrets were leaking in shell apps, fixed with expo/expo#7768 - When deployed, fixes expo/expo#7727. ### Description XDL was modifying `google-services.json`, removing valid keys if the user doesn't provide the same, removed key in _some other place_ (see expo/expo#7727 (comment)). Fixed the change in XDL, upgraded to the fixed version here. Also removed secrets from the shell app.
Why
Following Using FCM doc or GoogleSignIn - Usage with Firebase part would not render the expected results —
googleSignIn
configuration was always being applied ontogoogle-services.json
, even if a custom one has been provided by the user. Most probably this is not how this should work or what the user expect.When pushed to Turtle builders, should fix expo/expo#7727.
How
Depending on the SDK version of the built project:
google-services.json
if none was provided (so we're operating on a placeholder one)google-services.json
googleServicesFile
, print a warning that its contents are about to be modified,google-services.json
, as it has been working before.I have also moved the
replace "host.exp.exponent" with ${javaPackage}
to where the logic above is mentioned so that allgoogle-services.json
modifications are in one place.Test plan
googleServicesFile
— job, no warning, usedgoogle-services.json
googleSignIn
— job, no warning, uses placeholder project ID andgoogleSignIn
keygoogle-services.json
googleServicesFile
—job, no warning, removed key from google-services.jsonforce-pushed version where the warning should be printed and the key still removedgoogleSignIn
— job, no warning, usedgoogleSignIn
and leaking project ID