Is there any way to assemble only one flavor of the androidTest builds?

Found out how to do it for any build type, not just debug. Tests are only created for a single build type, by default it's debug, but it can be changed. In app build.gradle you need to add:

android { 

    testBuildType "myownbuildtype"
    ...
}

Then you should be able to do ./gradlew assembleMyflavorMyownbuildtypeAndroidTest


If flavor = "flavor" and type = "debug", then try:

./gradlew assembleFlavorDebugAndroidTest

Tags:

Android