-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
180 lines (146 loc) · 5.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
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
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.11'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
// asciidoctor
id 'org.asciidoctor.jvm.convert' version '3.3.2'
// jmh
id "me.champeau.jmh" version "0.7.1"
}
group = 'codesquad.fineants'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '17'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
asciidoctorExt
}
repositories {
mavenCentral()
}
dependencies {
// spring
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.boot:spring-boot-starter-websocket'
implementation 'org.springframework.boot:spring-boot-devtools'
implementation 'org.springframework.boot:spring-boot-starter-aop'
implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'org.springframework.boot:spring-boot-starter-security'
testImplementation 'org.springframework.security:spring-security-test'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-cache'
// websocket
implementation 'org.springframework.boot:spring-boot-starter-websocket'
// jwt 라이브러리
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
implementation 'io.jsonwebtoken:jjwt-impl:0.11.5'
implementation 'io.jsonwebtoken:jjwt-jackson:0.11.5'
// JWT 서명 검증 라이브러리
implementation 'com.auth0:java-jwt:3.19.0'
implementation 'com.auth0:jwks-rsa:0.21.1'
// AWS S3
implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE'
//encoder 추가
implementation 'org.springframework.security:spring-security-crypto'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
// mockWebserver
testImplementation 'com.squareup.okhttp3:okhttp:4.12.0'
testImplementation 'com.squareup.okhttp3:mockwebserver:4.12.0'
// firebase
implementation 'com.google.firebase:firebase-admin:9.1.1'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.projectlombok:lombok'
// final class mocking
testImplementation 'org.mockito:mockito-inline:2.13.0'
testAnnotationProcessor 'org.projectlombok:lombok'
// test container
testImplementation 'org.testcontainers:junit-jupiter:1.19.7'
testImplementation 'org.testcontainers:mysql:1.19.7'
implementation 'org.testcontainers:localstack:1.19.7'
// Rest Docs
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
// RxJava
implementation 'io.reactivex.rxjava3:rxjava:3.1.8'
// Rest-Assured
testImplementation 'io.rest-assured:rest-assured'
// Csv Reader
implementation 'org.apache.commons:commons-csv:1.11.0'
// QueryDsl
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jakarta"
// java.lang.NoClassDefFoundError 대응을 위해 추가
annotationProcessor 'jakarta.annotation:jakarta.annotation-api'
annotationProcessor 'jakarta.persistence:jakarta.persistence-api'
// JMH
testImplementation 'org.openjdk.jmh:jmh-core:1.37'
testImplementation 'org.openjdk.jmh:jmh-generator-annprocess:1.37'
}
tasks.named('test') {
useJUnitPlatform()
}
task copyPrivate(type: Copy) {
copy {
from './secret'
include "*.yml"
into 'src/main/resources/secret'
}
copy {
from './secret'
include "*.json"
into 'src/main/resources/secret/firebase'
}
}
// Rest Docs configuration start
ext { // 전역변수
snippetsDir = file('build/generated-snippets')
}
test {
outputs.dir snippetsDir
}
asciidoctor {
inputs.dir snippetsDir
configurations 'asciidoctorExt'
sources { // 특정 파일만 html로 만든다
include("**/index.adoc")
}
baseDirFollowsSourceFile() // 다른 adoc 파일을 include 할때 경로를 baseDir로 맞춘다
dependsOn test
}
// Rest Docs configuration end
bootJar {
// Rest Docs
dependsOn asciidoctor
from("${asciidoctor.outputDir}") {
into 'static/docs'
}
archiveFileName = "fineAnts_app.jar"
copyPrivate
}
// QueryDSL configuration start
def generated = "src/main/generated"
//Querydsl Q Class 생성 위치 지정
tasks.withType(JavaCompile).configureEach {
options.getGeneratedSourceOutputDirectory().set(file(generated))
}
//java source set 에 Querydsl Q Class 위치 추가
sourceSets {
main.java.srcDirs += [generated]
}
//gradle clean 시, Q Class 디렉토리까지 삭제하도록 설정
clean {
delete file(generated)
}
// QueryDSL configuration end