Files
atrium/gradle/scripts/jacoco-multi-project.gradle
Robert Stoll 3db8cbea93 re-add jacoco coverage to bc and bbc tests
and fix dependency to translations for infix, should also use de_CH in
bc-tests
2021-01-08 23:36:26 +01:00

44 lines
1.2 KiB
Groovy

apply plugin: 'kotlin'
apply plugin: 'jacoco'
jacoco {
toolVersion = "$jacocoToolVersion"
}
def jacocoProjects = (jacocoMulti.jacocoProjects)
def jacocoSourceProjects = (jacocoMulti.sourceProjects)
task jacocoMerge(type: JacocoMerge) {
jacocoProjects.each {
executionData file("${it.buildDir}/jacoco").listFiles().findAll { it.name.endsWith(".exec") }
}
}
task codeCoverageReport(type: JacocoReport) {
dependsOn jacocoMulti.sourceProjects.build
dependsOn jacocoMerge
jacocoMerge.mustRunAfter jacocoMulti.sourceProjects.build
executionData jacocoMerge.destinationFile
jacocoSourceProjects.each {
sourceSets it.sourceSets.main
}
doFirst {
println "going to generate merged jacoco report based on:"
println " - source projects: ${jacocoSourceProjects*.name}"
println " - jacoco projects: ${jacocoProjects*.name}"
println "========================================="
}
reports {
xml.enabled = true
xml.destination file("${buildDir}/reports/jacoco/report.xml")
html.enabled = true
html.destination file("${buildDir}/reports/jacoco/html/")
csv.enabled = false
}
}