Skip to content

Commit

Permalink
Added jacoco coverage check
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbata committed Nov 8, 2022
1 parent 1a16787 commit 0119e79
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id 'distribution'
id 'org.gradle.crypto.checksum' version '1.4.0'
id 'checkstyle'
id 'jacoco'
}

compileJava.options.encoding = 'UTF-8'
Expand Down Expand Up @@ -72,6 +73,44 @@ task bumpVersion {
}
}

jacocoTestCoverageVerification {
violationRules {
rule {
element = 'PACKAGE'
limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.8
}
includes = [
'jpass.data',
'jpass.crypt',
'jpass.crypt.io',
'jpass.io',
'jpass.xml.converter',
'jpass.xml.bind'
]
}

rule {
element = 'PACKAGE'
limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.4
}
includes = [
'jpass.util'
]
}
}
}

distTar.enabled = false
distZip.finalizedBy(createChecksum)
assembleDist.dependsOn copyConfig

test.finalizedBy jacocoTestReport
jacocoTestReport.dependsOn test
jacocoTestCoverageVerification.dependsOn jacocoTestReport
check.dependsOn jacocoTestCoverageVerification

0 comments on commit 0119e79

Please sign in to comment.