JaCoCo agent path problem with multi-module project

(Peter Lajko) #1


JaCoCo agent path is invalid in the jvm args with multi-module project.:


Paths need to use the $projectDir as root of the relative path, or did I miss some configuration here?



(Luke Daley) #2


Any chance you could put together a sample project with the problem?

(Peter Lajko) #3


I created a small sample project, gradle 1.6 was used.


(Luke Daley) #4

I raised GRADLE-2859 for this. I found the problem (details on linked issue to that issue).

As a workaround, you need to do this for the test task:

systemProperties[‘user.dir’] = workingDir

(Peter Lajko) #5

Thanks for the solution!

(Mark Petrovic) #6

I tried flowing this assignment down to all test tasks, which would include intTest-type tasks, in my multiproject build with

allprojects {

tasks.withType(Test) {

systemProperties[‘user.dir’] = workingDir

} }

but the jacocoagent problem persists.