The Android Gradle plugin brings the product flavors in Android. The Gradle plugin also handles this flavor system.
If the Android Gradle plugin is added and flavors are declared, you can set specific virtual devices to be started during tests related to flavors.
In the following example, two flavors are defined in the
In the following example, three virtual devices are defined. device1 is declared without specifying a flavor. It is considered as common to all flavors and will be started for each of them.
Then, device2 will be launched for flavor1 and device3 will be launched for both flavors.
template "Google Nexus 5 - 4.4.4 - API 19 - 1080x1920"
template "Google Nexus 7 - 4.2.2 - API 17 - 800x1280"
template "Google Nexus 10 - 4.3 - API 18 - 2560x1600"
productFlavors "flavor1", "flavor2"