-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
112 lines (91 loc) · 2.5 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.2'
id 'io.spring.dependency-management' version '1.1.6'
id 'jacoco'
}
group = 'newCar'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation 'mysql:mysql-connector-java:8.0.33'
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'redis.clients:jedis:5.1.4'
// JSON Web Token (JWT) 라이브러리
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5' // Jackson 기반 JSON 처리
}
tasks.named('test') {
useJUnitPlatform()
finalizedBy jacocoTestReport // 테스트가 완료된 후 보고서를 생성하도록 설정
}
jacoco {
toolVersion = "0.8.10" // JaCoCo의 최신 버전 사용
}
jacocoTestReport {
reports {
xml.required.set(true)
html.required.set(true)
}
afterEvaluate {
classDirectories.setFrom(
files(classDirectories.files.collect {
fileTree(dir: it, excludes: [
'**/model/**',
'**/config/**',
'**/*Application*',
'**/exception/**',
'**/controller/**',
'**/repository/redis',
'**/interceptor/**'
])
})
)
}
}
jacocoTestCoverageVerification {
violationRules {//커버리지 범위와 퍼센테이지를 설정합니다
rule {
element = 'CLASS'
limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.80
}
excludes = [
'**.*Application',
'**.model.**',
'**.config.**',
'**.exception.**',
'**.controller.**',
'**.repository.redis',
'**.interceptor.**'
]
}
}
}
check.dependsOn jacocoTestCoverageVerification