Clover and jacoco

plugins

(Fresh Code) #1

I am trying to use both the clover and the jacoco report but they conflict as clover inserts instrumentation into the class files which jacoco detects and doesn’t like.

I was thinking the best thing to do would be to run the test phase twice once with clover and once with jacoco. The problem is the clover dependency on the test task always runs and I can’t disable it. How can I remove it? I created a new task like:

task jacocoTest2 (type: Test) {

configurations.all {
exclude group: ‘clover’
}

}

But clover still runs. I want a copy of the test task without clover re-running on it.

Thank you for any pointers / help !!


(uklance) #2

What’s the reason for using two different coverage tools?


(Fresh Code) #3

One reason would be that the code coverage tools provide different reports. I like the clover reports but we also have some people who have been used to the jacoco reports. I don’t want to remove the reporting provided by jacoco just because I now have clover integrated into the build. I am not familiar with either one enough to know if one is better than the other for now I’d like the ability to generate both coverage reports.