-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
209 lines (157 loc) · 6.26 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
plugins {
id 'org.springframework.boot' version '2.6.3'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.asciidoctor.convert' version '1.5.8'
id 'java'
id "org.sonarqube" version "3.3"
id 'jacoco'
id "com.ewerk.gradle.plugins.querydsl" version "1.0.10"
}
jacoco {
toolVersion = "0.8.7"
reportsDirectory = layout.buildDirectory.dir('customJacocoReportDir')
}
group = 'boaz.site'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
jar {
enabled = false
}
ext {
set('snippetsDir', file("build/generated-snippets"))
}
dependencies {
//aws
implementation platform('com.amazonaws:aws-java-sdk-bom:1.11.228')
implementation 'com.amazonaws:aws-java-sdk-s3'
// object storage
implementation("io.minio:minio:8.3.6")
implementation("com.squareup.okhttp3:okhttp:4.7.0")
implementation 'org.springframework.boot:spring-boot-starter-data-jpa' exclude module: 'spring-boot-starter-logging'
//web
implementation 'org.springframework.boot:spring-boot-starter-web' exclude module: 'spring-boot-starter-logging'
//lombok
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
//database
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc' exclude module: 'spring-boot-starter-logging'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'mysql:mysql-connector-java'
implementation "com.querydsl:querydsl-jpa:5.0.0"
implementation "com.querydsl:querydsl-apt:5.0.0"
//aop
implementation 'org.springframework.boot:spring-boot-starter-aop'
//validation
implementation 'org.springframework.boot:spring-boot-starter-validation'
//test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
//jwt
implementation group: 'io.jsonwebtoken', name: 'jjwt', version: '0.9.1'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.13.1'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.datatype/jackson-datatype-jsr310
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.12.4'
//logger
// implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.1'
// implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.17.1'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.13.1'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.1'
implementation 'org.springframework.boot:spring-boot-starter-log4j2' // log4j2
//bcrypt
// https://mvnrepository.com/artifact/org.mindrot/jbcrypt
implementation group: 'org.mindrot', name: 'jbcrypt', version: '0.4'
//mail
implementation 'org.springframework.boot:spring-boot-starter-mail'
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-freemarker
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-freemarker', version: '2.6.6'
// swagger dependency
implementation "io.springfox:springfox-boot-starter:3.0.0"
implementation "io.springfox:springfox-swagger-ui:3.0.0"
//Slack Sdk
implementation("com.slack.api:slack-api-client:1.23.1")
//geoip2
// https://mvnrepository.com/artifact/com.maxmind.geoip2/geoip2
implementation group: 'com.maxmind.geoip2', name: 'geoip2', version: '2.15.0'
//open tracing
// https://mvnrepository.com/artifact/io.opentracing.contrib/opentracing-spring-jaeger-web-starter
implementation group: 'io.opentracing.contrib', name: 'opentracing-spring-jaeger-web-starter', version: '3.3.1'
// https://mvnrepository.com/artifact/io.opentracing.contrib/opentracing-jdbc
implementation group: 'io.opentracing.contrib', name: 'opentracing-jdbc', version: '0.2.15'
// https://mvnrepository.com/artifact/io.opentracing.contrib/opentracing-spring-cloud-starter
implementation group: 'io.opentracing.contrib', name: 'opentracing-spring-cloud-starter', version: '0.5.9'
//health check
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-actuator
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: '2.6.3'
}
configurations {
all {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
}
}
tasks.named('test') {
outputs.dir snippetsDir
useJUnitPlatform()
}
tasks.named('asciidoctor') {
inputs.dir snippetsDir
dependsOn test
}
test {
useJUnitPlatform()
finalizedBy 'jacocoTestReport' // 추가
}
jacocoTestReport {
reports {
// 원하는 리포트를 켜고 끌 수 있습니다.
xml.required = true
csv.required = false
// 각 리포트 타입 마다 리포트 저장 경로를 설정할 수 있습니다.
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
xml.destination file("$buildDir/jacoco/jacoco.xml")
// xml.destination file("$buildDir/jacoco.xml")
}
}
jacocoTestCoverageVerification {
violationRules {
rule {
element = 'CLASS'
limit {
counter = 'BRANCH'
value = 'COVEREDRATIO'
minimum = 0.60
}
excludes = []
}
}
}
//이놈
def querydslDir = "$buildDir/generated/querydsl"
querydsl {
//이놈
jpa = true
querydslSourcesDir = querydslDir
}
sourceSets { //이놈
main.java.srcDir querydslDir
}
configurations { // 이놈
compileOnly {
extendsFrom annotationProcessor
}
querydsl.extendsFrom compileClasspath
}
compileQuerydsl { // 이놈
options.annotationProcessorPath = configurations.querydsl
}