I want to specify dependencies for my tests and after reading the Gradle Dependency Management Basics I though I could just add testCompile calls to my dependen
Just to make this question answered in full this is what is needed to resolve the issue. Since Junit is wanted for local testing and guava might be wanted for androidTest the android DSL should contain this:
android {
:
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src/main/java']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
:
}
test {
java.srcDirs = ['src/test/java']
resources.srcDirs = ['src/test/resources']
:
}
androidTest.setRoot('tests')
}
:
}
The : means other statements that you need. Please also note that the folders can be others than the ones above.