The release notes from Android 1.3 state that it's now possible to have application tests under a separate module (source: http://android-developers.blogspot.ro/2015/07/get-your-hands-on-android-studio-13.html)
For more flexibility in app testing, you now have the option to place your code tests in a separate module and use the new test plugin (‘com.android.test’) instead of keeping your tests right next to your app code. This feature does require your app project to use the Gradle Plugin 1.3
However, I haven't seen any option in AS to create such module and when I try to create one myself (first create Java library module, then alter its build.gradle file), like:
apply plugin: 'com.android.test'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
targetProjectPath ':app'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
I'm getting an error:
Error:Configuration with name 'debug-classes' not found.
Has anyone managed to get this working?
P. S. I'm using AS 1.3 with Android Gradle plugin v1.3.