Closed eyalroth closed 5 years ago
I think the problem here may be my documentation skills :-)
There is a subtle difference between coverageDirs
and coverageSourceDirs
. Each one is used to satisfy a different need in Cobertura itself.
coverageDirs
is a set of compiled classes that are given to Cobertura to instrument via the InstrumentTask
.
coverageSourceDirs
is set to the uncompiled Java (and groovy and scala) source files, which are given to Cobertura when it generates reports via the GenerateReportTask
. Cobertura uses these files to produce the marked up HTML showing your source code and which lines were executed by your tests.
I've modified the usage.md file. Hopefully the change clarifies the difference between the two.
Usage says:
However, only the
coverageDirs
option seems to affect which directories will be instrumented. Looking atInstrumentTask.groovy
's code reflects this behavior quite clearly.