googlesamples / google-services

A collection of quickstart samples demonstrating the Google APIs for Android and iOS
https://developers.google.com
Apache License 2.0
3.07k stars 2.53k forks source link

Apply GMS gradle plugin only for specific flavor #160

Closed dvdh closed 8 years ago

dvdh commented 8 years ago

Google Analytics documentation https://developers.google.com/analytics/devguides/collection/android/v4/

requires the use of this gradle plugin apply plugin: 'com.google.gms.google-services'

However it is not clear how to apply this plugin only for specific flavors.

Example use case: I have a free app flavor with google analytics, a paid version without analytics.

Can you please provide an example on how to achieve this?

Thanks, David.

samtstern commented 8 years ago

Please see the discussion on #54 which I think will contain the details you are looking for.

dvdh commented 8 years ago

Thanks @samtstern, exactly it.