-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathjacoco.gradle
48 lines (44 loc) · 1.13 KB
/
jacoco.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
apply plugin:"jacoco"
jacoco {
toolVersion = "0.8.8"
}
test {
useJUnitPlatform()
jacoco {
excludes = ['**/Application.groovy',
'**/BootStrap.groovy',
'**/UrlMappings.groovy',
'**/*GrailsPlugin.groovy',
'**/*Mock.groovy',
'com.skedgo.converter.*']
}
finalizedBy jacocoTestReport // report is always generated after tests run
}
jacocoTestReport {
dependsOn test
finalizedBy jacocoTestCoverageVerification // report is always generated after tests run
afterEvaluate {
getClassDirectories().setFrom(classDirectories.files.collect {
fileTree(dir: it,
exclude: [
'**/TimezoneMapper.class'
]
)
})
}
reports {
xml.enabled false
csv.enabled false
html.destination file("${buildDir}/reports/jacocoHtml")
}
}
jacocoTestCoverageVerification {
dependsOn test
violationRules {
rule {
limit {
minimum = 0.31
}
}
}
}