Slackbot
02/01/2024, 4:10 AMVampire
02/01/2024, 8:08 AMAlexander Gherschon
02/01/2024, 8:10 AM:jacocoTestReport
tasks in each subproject, parse them and returns us the total coverage for the whole projectVampire
02/01/2024, 8:14 AMAlexander Gherschon
02/01/2024, 8:19 AMval totalCoverage = File(project.rootDir.absolutePath)
.walk()
.filter { it.name.endsWith(".uatDebug.xml") }
.toList()
.mapNotNull { file -> JacocoReportParser.parse(file) }
.run {
val totalCovered = sumOf { it.covered }
val totalMissed = sumOf { it.missed }
return@run (totalCovered / (totalCovered + totalMissed).toDouble()) * 100
}
Vampire
02/01/2024, 8:21 AMdependsOn
. Actually, any explicit dependsOn
that does not have a lifecycle task on the left-hand side is a small and most probably a sign that inputs and output are not properly wired as it should be. Here you can read about how to properly share outputs between projects: https://docs.gradle.org/current/userguide/cross_project_publications.html
You can also have a look at the JaCoCo report aggregation plugin or test report aggregation plugin which use that approach to create aggregated reports across projects.Vampire
02/01/2024, 8:22 AMAlexander Gherschon
02/01/2024, 8:25 AMVampire
02/01/2024, 8:27 AMAlexander Gherschon
02/01/2024, 8:30 AMVampire
02/01/2024, 8:39 AMAlexander Gherschon
02/01/2024, 9:25 AMVampire
02/01/2024, 10:14 AM