Skip to content

Commit

Permalink
[#206] Jacoco 설정 추가!
Browse files Browse the repository at this point in the history
  • Loading branch information
harrisleesh committed May 1, 2021
1 parent ce2b25e commit 6e69907
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id 'org.asciidoctor.convert' version '1.5.9.2'
id 'java'
id "com.github.node-gradle.node" version "2.2.0"
id 'jacoco'
}

group = 'org.kiworkshop'
Expand Down Expand Up @@ -54,6 +55,7 @@ dependencies {
test {
outputs.dir snippetsDir
useJUnitPlatform()
finalizedBy 'jacocoTestReport'
}

asciidoctor {
Expand Down Expand Up @@ -97,7 +99,33 @@ task copyWebApp(type: Copy) {
from "src/frontend/build/"
into 'build/resources/main/static'
}

jacocoTestReport{
reports{
xml.enabled false
csv.enabled false
html.enabled true
}
finalizedBy 'jacocoTestCoverageVerification'
}
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 0.5
}
}
rule {
enabled = false
element = 'CLASS'
includes = ['org.gradle.*']
limit {
counter = 'LINE'
value = 'TOTALCOUNT'
maximum = 0.3
}
}
}
}
yarnBuild.dependsOn yarnInstall
copyWebApp.dependsOn yarnBuild
compileJava.dependsOn copyWebApp

0 comments on commit 6e69907

Please sign in to comment.