Make Jacoco work with multiple test tasks (#437)

* Make Jacoco work with multiple test tasks

By default Jacoco only looks at execution data from
the 'test' task. This is a problem to 'core' which
has multiple test sets.
This commit is contained in:
Weimin Yu 2020-01-09 16:32:33 -05:00 committed by GitHub
parent 36cfd31b80
commit d261385f33

View file

@ -121,6 +121,11 @@ spotless {
}
}
jacocoTestReport {
// Use coverage data from all tests tasks, not just the one named 'test'.
getExecutionData().setFrom(fileTree(buildDir).include("/jacoco/*.exec"))
}
// Initialize for coverage minimum determination for each sub project.
task initCoverageMinimums {
// Use current coverage ratio of each subproject as placeholder value.