mirror of
https://github.com/jlengrand/atrium.git
synced 2026-03-10 08:01:19 +00:00
44 lines
1.2 KiB
Groovy
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
|
|
}
|
|
}
|