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

🐛 Play nice with other plugins including Play Services libraries #645

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

macdonst
Copy link

Because of the way cordova-android plugins specify their framework dependencies there is a chance that a plugin will pin an earlier version of play services and it will cause issues for other plugins requiring a later version of play services.

In order to allow end users to specify the version of frameworks in their config.xml file and free up plugin maintainers from having to release a new version of the plugin every time play services updates we introduced variables in the framework tag in cordova 7.1.0.

This PR updates the plugin.xml to use a variable for the play-services-ads dependency. This way users can match the play services versions across all plugins. With this PR merged folks will be able to:

<plugin name="phonegap-plugin-push" spec="2.0.0" source="npm">
  	    <variable name="FCM_VERSION" value="15.0.0" />
</plugin>
<plugin name="cordova-admob-pro" spec="2.0.0" source="npm">
  	    <variable name="PLAY_SERVICES_VERSION" value="15.0.0" />
</plugin>

This way both plugins will compile with play services 15 and not cause any run time errors.

Sorry for the whitespace changes in plugin.xml, Prettier did it.

See: phonegap/phonegap-plugin-push#2360

@alexstanbury
Copy link

@floatinghotpot - Please also incorporate this PR into https://github.com/floatinghotpot/cordova-plugin-facebookads, would be massively appreciated!

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

Successfully merging this pull request may close these issues.

2 participants