My app should have flavors (Play Store, Amazon, Samsung, Blackberry). As I think, only apps from the Play Store can use Android Wear, because of only this devices can use the Play Services. Now, I don't want to pack my Wear apk into every flavor with
dependencies {
wearApp project(':android-wear')
}
How can I do it only for the Play Store flavor? Is it possible?
As of 0.14.3
this is possible. Suppose your flavor for Google Play is called google
, your dependencies
entry would be called googleWearApp
:
productFlavors {
google {
}
}
dependencies {
googleWearApp project(':wear')
}
It's not possible at present (v0.12.2 of the Android Gradle plugin at the time I'm writing this). A feature request has been filed; you cant track it at https://code.google.com/p/android/issues/detail?id=74658
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With