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 d4b1048363
commit 533515817f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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.