-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
95 lines (83 loc) · 2.4 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
86
87
88
89
90
91
92
93
plugins {
id 'java'
id 'pmd'
id 'jacoco'
}
group = 'code'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '21'
repositories {
mavenCentral()
}
ext {
lombokVersion = '1.18.22'
springVersion = '6.1.1'
junitVersion = '5.10.0'
}
dependencies {
// implementation "org.springframework:spring-core:$springVersion"
// implementation "org.springframework:spring-beans:$springVersion"
// implementation "org.springframework:spring-context:$springVersion"
// implementation "org.springframework:spring-context-support:$springVersion"
// implementation "org.springframework:spring-expression:5.3.26"
// compileOnly "org.projectlombok:lombok:$lombokVersion"
// annotationProcessor "org.projectlombok:lombok:$lombokVersion"
// testCompileOnly "org.projectlombok:lombok:$lombokVersion"
// testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
//
// implementation "ch.qos.logback:logback-classic:1.2.9"
// implementation "org.slf4j:slf4j-api:1.7.36"
//
// testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
// testImplementation "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
// testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
//
// implementation "de.elnarion.util:plantuml-generator-util:2.3.0"
}
//jar {
// manifest {
// attributes 'MainRunner-Class': 'code.Main'
// }
// from {
// configurations.runtimeClasspath.collect {
// it.directory ? it : zipTree(it)
// }
// }
//}
// To turn on only consoleOutput, comment rest, priority doesn't seem to work, it passes no matter what
pmd {
consoleOutput = false
toolVersion = "6.21.0"
rulesMinimumPriority = 5
ruleSets = ["category/java/errorprone.xml", "category/java/bestpractices.xml"]
}
test {
useJUnitPlatform()
testLogging {
events "skipped", "failed"
}
finalizedBy jacocoTestReport
}
jacoco {
toolVersion = "0.8.7"
}
jacocoTestReport {
dependsOn test
reports {
xml.required = false
csv.required = false
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
}
}
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.5
}
}
}
}
check.dependsOn jacocoTestCoverageVerification