Does anybody know how to configure a gradle file for java jacoco report that contain codecoverage of more than one gradle submodule?
my current approach only shows c
You can create a merged report without merged exec file. Create a new task to the root of build.gradle with following content.
task jacocoReport(type: JacocoReport) {
for (p in allprojects) {
def testTask = p.tasks.findByName("test")
if (testTask != null)
dependsOn(testTask)
executionData.setFrom(file("${p.buildDir}/jacoco/test.exec"))
classDirectories.from(file("${p.buildDir}/classes/java/main"))
}
}