This repository has been archived by the owner on Oct 3, 2024. It is now read-only.
forked from BIBSYSDEV/sikt-developer-task-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
85 lines (70 loc) · 1.71 KB
/
build.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
plugins {
id 'java-library'
id 'jacoco'
id 'checkstyle'
id 'pmd'
id 'idea'
}
group 'no.sikt'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
def jupiterVersion = '5.8.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: jupiterVersion
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: jupiterVersion
}
test {
useJUnitPlatform()
failFast = true
testLogging {
events 'skipped', 'passed', 'failed'
showExceptions true
exceptionFormat "full"
showCauses true
showStackTraces true
}
finalizedBy jacocoTestReport
}
jacocoTestReport {
reports {
xml.enabled true
}
}
pmd {
ruleSetConfig = rootProject.resources.text.fromFile('config/pmd/ruleset.xml')
ruleSets = []
ignoreFailures = false
}
checkstyle {
configFile = rootProject.resources.text.fromFile('config/checkstyle/checkstyle.xml').asFile()
showViolations = true
}
tasks.withType(Checkstyle) {
reports {
xml.enabled false
html.enabled true
html.stylesheet rootProject.resources.text.fromFile('config/checkstyle/checkstyle-simple.xsl')
}
}
check.dependsOn jacocoTestCoverageVerification
jacocoTestCoverageVerification.dependsOn(jacocoTestReport)
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
counter = 'METHOD'
value = 'COVEREDRATIO'
minimum = 1.000
}
}
rule {
limit {
counter = 'CLASS'
value = 'COVEREDRATIO'
minimum = 1.000
}
}
}
}