-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
113 lines (96 loc) · 2.83 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
}
group = 'org.example'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
bootJar.enabled = false
subprojects {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'jacoco'
repositories {
mavenCentral()
}
// 관리하는 모듈의 공통 dependencies
dependencies {
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:2023.0.1"
}
}
jacoco {
toolVersion = '0.8.10'
setReportsDirectory(file("${rootDir}/build/code-coverage"))
}
test {
tasks.named('test') {
useJUnitPlatform()
systemProperty "jasypt.encryptor.password", project.getProperties().get("jasypt.encryptor.password")
}
useJUnitPlatform()
finalizedBy 'jacocoTestReport'
}
jacocoTestReport {
dependsOn test
reports {
html.required = true
xml.required = true
}
// 결과 리포트에서 제외할 클래스들
def Qdomains = []
for (qPattern in '**/QA'..'**/QZ') {
Qdomains.add(qPattern + '*')
}
afterEvaluate {
classDirectories.setFrom(
files(classDirectories.files.collect {
fileTree(dir: it, excludes: [
"**/*Application*",
"**/*Mapper*",
"**/*Provider*",
"**/*Config*",
"**/*Util*",
"**/*Request*",
"**/*Response*",
] + Qdomains)
})
)
}
finalizedBy 'jacocoTestCoverageVerification'
}
jacocoTestCoverageVerification {
def Qdomains = []
for (qPattern in '*.QA'..'*.QZ') {
Qdomains.add(qPattern + '*')
}
violationRules {
rule {
enabled = true
element = 'CLASS'
includes = []
limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.00
}
excludes = [
"**.*Application*",
"**.*Mapper*",
"**.*Provider*",
"**.*Config*",
"**.*Request*",
"**.*Response*",
] + Qdomains
}
}
}
sourceCompatibility = '17'
}