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, since only these devices can use Play Services. Now I do not want to pack my Wack apk in every taste with

dependencies { wearApp project(':android-wear') } 

How can I do this just for the taste of the Play Store? Is it possible?

+5
source share
2 answers

As in the case of 0.14.3 , this is possible. Suppose your taste for Google Play is called google , your dependencies entry will be called googleWearApp :

 productFlavors { google { } } dependencies { googleWearApp project(':wear') } 
+2
source

This is currently not possible (v0.12.2 of the Android Gradle plugin while I am writing this). A request was made for a function; you cannot track it at https://code.google.com/p/android/issues/detail?id=74658

+2
source

Source: https://habr.com/ru/post/1202845/


All Articles