cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gearóid M (JIRA) <>
Subject [jira] [Commented] (CB-14154) Expose gradle configuration properties in config.xml to assist aligning Google Play Services / Firebase
Date Fri, 22 Jun 2018 03:41:00 GMT


Gearóid M commented on CB-14154:

Ah I see! I'm not too familiar with using Google Play Services, but had remembered reading
that blog post. Perhaps you could create a PR to add these config properties? It sounds like
you have a very good idea of how it would work.

> Expose gradle configuration properties in config.xml to assist aligning Google Play Services
/ Firebase
> -------------------------------------------------------------------------------------------------------
>                 Key: CB-14154
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: cordova-android
>    Affects Versions: cordova-android-7.0.0
>            Reporter: Christopher Scott
>            Assignee: Joe Bowser
>            Priority: Major
>              Labels: build
> I am a full-time plugin developer.  Like many other plugins, I import Google Play Services
dependencies in addition to Android Support libraries (appcompat-v7).
> By far the biggest problem I encounter with my users is [Gradle conflicts|]
due to multiple plugins importing different versions of {color:#333333}play-services / Firebase
/{color} libraries.
> Many plugin authors do the wrong thing and simply use version ":+", eg: [cordova-plugin-firebase|]].
> Quite often, my solution for these users is to [edit platforms/android/|]*_,_* which
is not the best long-term solution, since this file is _volatile_.
> What I've been doing since cordova@7.1.0 is [expose custom config properties in my plugins'
This is nice, but users must align their google-play / Firebase / Support dependencies [for
each plugin that exposes these|]
helpful properties (and not many plugins do).
> What would *_really_* help, is if cordova-android could expose variables in the app's
config.xml in the same manner as:
>  * cdvCompileSdkVersion
>  * cdvBuildToolsVersion
>  * cdvMinSdkVersion
> I would like to see the following properties added:
>  * cdvGooglePlayServicesVersion
>  * cdvSupportLibVersion
> (Note:  cdvGooglePlayServicesVersion could be named cdvGoogleApiVersion as a more common
name, since both Firebase and Google Play Services dependencies must be aligned to the same
> I would like to be able to access these properties in my plugin's [plugin.xml here|]]
instead of using my plugin's custom $GOOGLE_API_VERSION variable.
> In a React Native app, which provides direct control over one's top-level build.gradle,
we do it [like this|]]. 
3rd-party plugins then check for the existence of these Gradle Config Properties when importing
their Google dependencies, [like this|].
> This technique is also recommend at in the document [Gradle Tips
and Tricks|] (search "project-wide properties")

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message