2024-12-03 06:57:43 +05:30
|
|
|
apply plugin: "jacoco"
|
|
|
|
|
|
|
|
jacoco {
|
|
|
|
toolVersion = "0.8.12"
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
These need to run after evaluation since jacoco plugin alters the test task based on the included test
|
|
|
|
lib dependencies defined in each subproject (junit or testNG)
|
|
|
|
*/
|
|
|
|
afterEvaluate {
|
|
|
|
test {
|
|
|
|
finalizedBy jacocoTestReport
|
|
|
|
}
|
|
|
|
|
|
|
|
jacocoTestReport {
|
|
|
|
dependsOn test
|
|
|
|
reports {
|
|
|
|
xml {
|
|
|
|
required = true
|
|
|
|
/*
|
|
|
|
Tools that aggregate and analyse coverage tools search for the coverage result files. Keeping them under one
|
|
|
|
folder will minimize the time spent searching through the full source tree.
|
|
|
|
*/
|
2025-01-10 00:17:35 +05:30
|
|
|
outputLocation = rootProject.layout.buildDirectory.file("coverage-reports/${rootProject.relativePath(project.projectDir)}/jacoco-${project.name}.xml")
|
2024-12-03 06:57:43 +05:30
|
|
|
}
|
|
|
|
csv.required = false
|
|
|
|
html.required = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|