I am trying to exclude some generated classes from jacoco coverage report. Which is working fine with groovy but after converting to Kotlin it's not working
tasks.withType<JacocoCoverageVerification> {
afterEvaluate {
files(classDirectories.files.forEach() {
fileTree(it).apply {
exclude("com/generate/**")
}
})
}
violationRules {
rule {
limit {
minimum = BigDecimal(0.30)
}
}
}
}
tasks.getByName("check")
.dependsOn(tasks.getByName("jacocoTestCoverageVerification"))
But violation rule working perfectly.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…