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
The android build system doesn't use the standard Gradle Java plugin.
Its documentation says:
As mentioned previously, next to the main sourceSet is the androidTest sourceSet, located by default in src/androidTest/
Additionally, the sourceSet can be configured to have its own dependencies. By default, the application and its own dependencies are added to the test app classpath, but this can be extended with
dependencies {
androidTestCompile 'com.google.guava:guava:11.0.2'
}
Update
As of May 2017 Doc,
testCompile
is deprecated and you should usetestImplementation
dependencies {
androidTestImplementation 'com.google.guava:guava:11.0.2'
}