Skip to content

Instantly share code, notes, and snippets.

@th-deng
Last active January 5, 2022 06:29
Embed
What would you like to do?
Config JaCoCo report and violation rules
// groovy DSL
jacocoTestReport {
reports {
// 원하는 리포트를 켜고 끌 수 있습니다.
html.enabled true
xml.enabled false
csv.enabled false
// 각 리포트 타입 마다 리포트 저장 경로를 설정할 수 있습니다.
// html.destination file("$buildDir/jacocoHtml")
// xml.destination file("$buildDir/jacoco.xml")
}
}
jacocoTestCoverageVerification {
violationRules {
rule {
element = 'CLASS'
limit {
counter = 'BRANCH'
value = 'COVEREDRATIO'
minimum = 0.90
}
}
}
}
// kotlin DSL
tasks.jacocoTestReport {
reports {
// 원하는 리포트를 켜고 끌 수 있습니다.
html.isEnabled = true
xml.isEnabled = false
csv.isEnabled = false
// 각 리포트 타입 마다 리포트 저장 경로를 설정할 수 있습니다.
// html.destination = file("$buildDir/jacocoHtml")
// xml.destination = file("$buildDir/jacoco.xml")
}
}
tasks.jacocoTestCoverageVerification {
violationRules {
rule {
element = "CLASS"
limit {
counter = "BRANCH"
value = "COVEREDRATIO"
minimum = "0.90".toBigDecimal()
}
}
}
}
@th-deng
Copy link
Author

th-deng commented Aug 31, 2021

확인해 주셔서 고맙습니다!! 그 사이도 많이 바뀐 것 같군요. 정리해서 한번 업데이트를 해보겠습니다.
고맙습니다. =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment