I use flavors in my project and I wanna add add instrumentation tests specific for each flavor.
So I created
MyApplication/src/androidTestFlavor1/java/com.package.test
MyApplication/src/androidTestFlavor2/java/com.package.test
But it doesn't work correctly.
So, I've tried to configure it in build.gradle, I've added
android {
...
sourceSets {
flavor1{
instrumentTest.setRoot('src/instrumentationTestFlavor/java')
}
}
...
}
but I get error:
Error:(59, 0) Could not find property 'instrumentTest' on source set ding.
What's the best solution here?