Does anyone know how to run tests from another gradle project and still get emma coverage reporting data?
Here is my current layout:
Root/ settings.gradle (no explicit build.gradle - just defines all subprojects) SubProjectA/ build.gradle src/ (all real source is here) SubProjectATest/ build.gradle src/ (all testing code is here) SubProjectB/ (similar structure as A) SubProjectBTest/ (similar structure as ATest)
I am currently using the emma plugin and I would like to build SubProjectA and run all the tests in SubProjectATest from build.gradle for SubProjectA.
Here are some things I tried inside build.gradle for SubProjectA
Adding the source set to (option 3) is the only option that worked, but it seems to be careless about it. Does anyone know how to do this using project dependencies?
Update # 1 I also tried one of the answers below to use test.dependsOn and the tests run, but the emma plugin reported the following: build/classes/test', not found
source share