I have JAVA library module along with sets of JUnit tests (This library are being used by other Android Application modules). I am able to run JUnit tests. However, in past we had situation where certain tests would behave differently when ran using Sun JVM than Android Dalvik VM. So I have created Android test project which includes JAVA library. However, I don’t want to copy JUnit tests from JAVA library into Android test library (mainly to avoid code duplication). How can I use source sets defined in JAVA library into Android test application ?
I have tried below but not success. androidTestCompile files(project(":javaLib").sourceSets.test.java.srcDirs)