I'm sharing a single login module across my apps, with a LoginActivity
that handles both Facebook and Google auth (logic + UI).
Now, with Facebook it's easy to specify a different ID for each app, overriding the library's facebook_app_id
string in the app module.
I didn't find a way to do the same with Google Sign-In because it requires a google-services.json
file. In fact, the build fails if I include the file in the app modules and not in the login library.
Error:Execution failed for task ':core:processReleaseGoogleServices'.
File google-services.json is missing. The Google Services Plugin cannot function without it.
The error is self-explanatory, I need google-services.json
in the login module. The point is that the other apps have their own google-services.json
too.
Is there a way I can add a dummy google-services.json
in the Login module and then override it in each app with the real one?