Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add google services support #893

Merged
merged 6 commits into from
Jan 15, 2020

Conversation

erisu
Copy link
Member

@erisu erisu commented Jan 15, 2020

Motivation and Context

To finish off the change requests and close out PR #438

closes: #438

Description

What this PR does:

  1. Cherry-picks commit changes from Add support for EnableGoogleServicesPlugin #438
  2. Wraps the Google Services classpath with the GoogleServicesEnabled flag.
  3. Introduces the GoogleServicesVersion preference variable that allows users to override the default to use older or newer Google Services classpath. (Defaults to: 4.2.0)

Testing

  • npm t
  • cordova platform add
  • cordova build android
    • build with no preference attributes.
    • build with preference GoogleServicesEnabled set to true
    • build with preference GoogleServicesEnabled set to true and GoogleServicesVersion set to 4.1.0

Checklist

  • I've run the tests to see all new and existing tests pass
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)

@erisu erisu added this to the 9.0.0 milestone Jan 15, 2020
@erisu erisu changed the title Feat/enable google services plugin feat: add google services support Jan 15, 2020
@erisu erisu requested a review from breautek January 15, 2020 02:23
@erisu erisu force-pushed the feat/enable-google-services-plugin branch from 917b463 to ee832dc Compare January 15, 2020 02:29
@erisu erisu force-pushed the feat/enable-google-services-plugin branch from ee832dc to 3af5a08 Compare January 15, 2020 02:34
Copy link
Member

@dpogue dpogue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 This looks good to me

@@ -356,3 +377,7 @@ for (def func : cdvPluginPostBuildExtras) {
if (hasProperty('postBuildExtras')) {
postBuildExtras()
}

if (cdvHelpers.getConfigPreference('GoogleServicesEnable', 'false').toBoolean()) {
apply plugin: 'com.google.gms.google-services'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my plugin when I do this, for some reason it needs to be the full path to the plugin, not just the string... I think that might have had something to do with being a subproject though

apply plugin: com.google.gms.googleservices.GoogleServicesPlugin

@erisu erisu merged commit a951793 into apache:master Jan 15, 2020
@erisu erisu deleted the feat/enable-google-services-plugin branch January 15, 2020 23:40
@chemerisuk
Copy link
Contributor

@erisu IMO current names a bit confusing. There are different google services that do not require this plugin (Maps, Ads etc.). So I suggest to change names to something like GoogleServicesPluginEnabled and GoogleServicesPluginVersion.

@erisu
Copy link
Member Author

erisu commented Jan 16, 2020

@chemerisuk #898

@chemerisuk
Copy link
Contributor

@erisu 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants