Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Wear flavor

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?

like image 961
mars3142 Avatar asked Sep 29 '22 20:09

mars3142


2 Answers

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')
}
like image 81
friederbluemle Avatar answered Oct 13 '22 11:10

friederbluemle


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

like image 21
Scott Barta Avatar answered Oct 13 '22 13:10

Scott Barta