On 2018/04/20 21:29:06, julio cesar sanchez <jcesarmob...@gmail.com> wrote: 
> Yeah, having the plugin as dependency should be enough, but as Simon said,
> as a lot of plugins will need this, makes sense to add it to the platform
> 
> El viernes, 20 de abril de 2018, Jesse <purplecabb...@gmail.com> escribió:
> 
> > So instead of plugin authors including gradle files, they would just add
> > the <preference/> to the plugin.xml and be done?
> >
> > I assume this requires a platform update.
> > Do we miss anything from not including a version as in <dependency/> way?
> > If we just ask plugin authors to add a dependency on
> > cordova-support-google-services
> > doesn't that mean that the android platform wouldn't need to change?
> >
> >
> >
> > @purplecabbage
> > risingj.com
> >
> > On Fri, Apr 20, 2018 at 12:04 PM, Simon MacDonald <
> > simon.macdon...@gmail.com
> > > wrote:
> >
> > > Hey all,
> > >
> > > I'd like to suggest that we add a new Android preference. It would be a
> > > boolean preference, to control whether or not to run the Google Services
> > > Plugin.
> > >
> > > A number of plugins need to have this gradle plugin run during build time
> > > and they are handling it via a gradle file included in their plugin like
> > > this:
> > >
> > > https://github.com/fechanique/cordova-plugin-fcm/blob/
> > > master/src/android/FCMPlugin.gradle
> > >
> > > but that falls down if two plugins try to apply GoogleServicesPlugin.
> > >
> > > The way to mitigate that right now is to have dependency on
> > > cordova-support-google-services so it will only run once.
> > >
> > > <dependency id="cordova-support-google-services" version="~1.1.0"/>
> > >
> > > However, it makes sense for this to be a preference in cordova-android.
> > > Perhaps,
> > >
> > > <preference name="android-RunGoogleServicesPlugin" value="true"/>
> > >
> > > If the value is true, then we apply the GoogleServicesPlugin.
> > >
> > > Simon Mac Donald
> > > http://simonmacdonald.com
> > >
> >
> After implementing the google plugin support in cordova-android, I can 
> publish a patch release for 
> https://github.com/chemerisuk/cordova-support-google-services to limit to 
> that version of cordova. So projects with olders version of cordova-android 
> with continue to use cordova-support-google-services, but newer will use the 
> new preference. 

Another suggestion is to drop android- prefix from the preference name - it 
seems like new cordova preferences use only camel case style, may be better to 
be consistent. Something like RunGoogleServicesPlugin or 
EnableGoogleServicesPlugin.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to