I have some instrumentation test classes under the folder androidTest which I would like to share across the other modules. The problem is when I add this module in the other project as a dependency androidTestCompile some resources are still missing. Is there any way to do this?
Asked
Active
Viewed 61 times
0
-
Possible duplicate of [How Do We Inherit Test Classes Across Android Library Modules?](http://stackoverflow.com/questions/37078710/how-do-we-inherit-test-classes-across-android-library-modules) – X-HuMan Jan 16 '17 at 09:28
1 Answers
0
You can try using sourceSets
in your modules, not sure if it will work, but worth to try out.
android {
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
androidTest.setRoot('tests')
}}

WenChao
- 3,586
- 6
- 32
- 46