-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
136 lines (119 loc) · 4.3 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
plugins {
id 'java'
id 'org.springframework.boot' version '2.7.14'
id 'io.spring.dependency-management' version '1.1.0'
id 'jacoco'
}
group = 'home.inuappcenter.kr'
version = '0.5.0-SNAPSHOT'
java {
sourceCompatibility = '11'
}
jar {
enabled = false
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
configureEach {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
}
}
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-actuator'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
// https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-starter-webmvc-ui
//implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webmvc-ui', version: '2.1.0'
// 2.7.X 버전에서는 아래 의존성 사용
implementation 'org.springdoc:springdoc-openapi-ui:1.7.0'
// Log4j2
implementation "org.springframework.boot:spring-boot-starter-log4j2"
// @Vaild 어노테이션을 위한 의존성
implementation 'org.springframework.boot:spring-boot-starter-validation:2.7.0'
// Spring Security & Test
implementation 'org.springframework.boot:spring-boot-starter-security:2.7.14'
testImplementation 'org.springframework.security:spring-security-test'
// JW TOKEN
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'
// Redis
implementation 'org.springframework.boot:spring-boot-starter-data-redis:2.7.14'
// Spring cache
implementation 'org.springframework.boot:spring-boot-starter-cache:2.7.14'
// Snappy Java
implementation 'org.xerial.snappy:snappy-java:1.1.10.5'
}
tasks.named('test') {
useJUnitPlatform()
}
bootRun {
String activeProfile = System.properties['spring.profiles.active']
systemProperty "spring.profiles.active", activeProfile
}
jacoco {
toolVersion = "0.8.8"
reportsDirectory = layout.buildDirectory.dir('customJacocoReportDir')
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
jacocoTestReport {
reports {
xml.required = false
csv.required = false
html.outputLocation = layout.buildDirectory.dir('jacocoHTML')
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it,
exclude: ["**/exception/*",
"**/UserDetailsServiceImpl.class",
"**/SignService.class",
"**/ImageService.class",
"**/data/*",
"**/common/data/*",
"**/config/*", "**/controller/ImageController.class", "**/controller/SignController.class",
"**/HomepageApplication.class"])
}))
}
dependsOn test
finalizedBy 'jacocoTestCoverageVerification'
}
jacocoTestCoverageVerification {
violationRules {
rule {
enabled = true
element = 'CLASS'
limit {
counter = 'METHOD'
value = 'COVEREDRATIO'
minimum = 0.5
}
}
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it,
exclude: ["**/exception/*",
"**/UserDetailsServiceImpl.class",
"**/SignService.class",
"**/ImageService.class",
"**/data/*",
"**/common/data/*",
"**/config/*", "**/controller/ImageController.class", "**/controller/SignController.class",
"**/HomepageApplication.class"])
}))
}
}