Hi,
We would like to support both gradle and ant for a while and we created the gradle files which build fine in command line, however when we import root project build.gradle we getting the following error Can't register given path of type 'TEST' because it's out of content root.
Content root: 'bla/bla/bla/android-develop'
Given path: 'bla/bla/bla/android-tests/src'
Our test code is in seperate folder and the develop app - i.e. sample app has the following in gradle to make it work:
project.ext.testsRootDir = new File('../android-tests/src').toString()
instrumentTest.setRoot(project.ext.testsRootDir)
instrumentTest {
dependencies {
compile fileTree(dir: "$project.ext.testsRootDir/libs", include: '*.jar')
}
java.srcDirs = ["$project.ext.testsRootDir/src"]
resources.srcDirs = ["$project.ext.testsRootDir/src"]
aidl.srcDirs = ["$project.ext.testsRootDir/src"]
renderscript.srcDirs = ["$project.ext.testsRootDir/src"]
res.srcDirs = ["$project.ext.testsRootDir/res"]
assets.srcDirs = ["$project.ext.testsRootDir/assets"]
}
Thanks.