Skip to content

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

Open
macdonst wants to merge 1 commit intofloatinghotpot:masterfrom
macdonst:master
Open

🐛 Play nice with other plugins including Play Services libraries#645
macdonst wants to merge 1 commit intofloatinghotpot:masterfrom
macdonst:master

Conversation

@macdonst
Copy link
Copy Markdown

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

@astanb
Copy link
Copy Markdown

astanb commented May 11, 2018

@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