-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
142 lines (105 loc) · 4.92 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.4'
id 'io.spring.dependency-management' version '1.1.6'
// Asciidoctor 플러그인 추가. 이 속에 있는 asciidoctor 태스크가 adoc파일과 스니펫 조합하여 hmtl로 변경
id 'org.asciidoctor.jvm.convert' version '3.3.2'
}
group = 'org.socialculture.platform'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
configurations {
//디펜던시 블럭에 asciidoctorExt로 라이브러리를 불러올 수 있도록 선언.
//adoc파일에서 스니펫 경로에 있는 스니펫들을 쉽게 불러올 수 있도록 함.
asciidoctorExt
}
ext {
//snippetsDir 변수 설정
set('snippetsDir', file("build/generated-snippets"))
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-web'
//공간 정보를 위한 라이브러리
implementation 'org.hibernate:hibernate-core:6.4.1.Final'
implementation 'org.hibernate:hibernate-spatial:6.4.1.Final'
implementation 'org.locationtech.jts:jts-core:1.18.1'
// query dsl 추가. spring boot 3 이상에서 :jakarta를 붙여야 오류 발생x
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
annotationProcessor 'com.querydsl:querydsl-apt:5.0.0:jakarta'
annotationProcessor 'jakarta.persistence:jakarta.persistence-api'
annotationProcessor 'jakarta.annotation:jakarta.annotation-api'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.mysql:mysql-connector-j'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor'
testImplementation'org.springframework.restdocs:spring-restdocs-mockmvc' //mockMvc 기반으로 스니펫 뽑을 수 있도록 추가.
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation 'com.google.code.gson:gson:2.8.9'
// query dsl 추가. spring boot 3 이상에서 :jakarta를 붙여야 오류 발생x
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
annotationProcessor 'com.querydsl:querydsl-apt:5.0.0:jakarta'
annotationProcessor 'jakarta.persistence:jakarta.persistence-api'
annotationProcessor 'jakarta.annotation:jakarta.annotation-api'
// Lombok 의존성 추가
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
// Mockito core library
testImplementation 'org.mockito:mockito-core:5.5.0'
// Mockito with JUnit 5 integration
testImplementation 'org.mockito:mockito-junit-jupiter:5.5.0'
//jwt
implementation 'io.jsonwebtoken:jjwt-api:0.11.2'
implementation 'io.jsonwebtoken:jjwt-impl:0.11.2'
implementation 'io.jsonwebtoken:jjwt-jackson:0.11.2'
implementation 'javax.xml.bind:jaxb-api:2.3.1'
implementation 'org.glassfish.jaxb:jaxb-runtime:2.3.1'
// webflux 의존성 추가
implementation 'org.springframework.boot:spring-boot-starter-webflux'
// Spring WebSocket 의존성
implementation 'org.springframework.boot:spring-boot-starter-websocket'
// email 인증 의존성 추가
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-mail', version: '3.0.5'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'commons-net:commons-net:3.9.0'
// redis 의존성 추가
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
// embedded-redis 의존성 추가
implementation group: 'it.ozimov', name: 'embedded-redis', version: '0.7.2'
}
//querydsl 추가 시작
def querydslSrcDir = "$projectDir/build/generated"
clean {
delete file(querydslSrcDir)
}
tasks.withType(JavaCompile) {
options.generatedSourceOutputDirectory = file(querydslSrcDir)
}
tasks.named('test') {
outputs.dir snippetsDir // snippetsDir변수 test의 output.dir로 설정.
useJUnitPlatform()
finalizedBy asciidoctor // 이 태스크 끝나고 asciidoctor 태스크 시작
}
asciidoctor { //adoc을 html로 변환해주는 설정.
inputs.dir snippetsDir // input.dir을 이전에 설정한 snippetDir로 설정
configurations 'asciidoctorExt'
dependsOn test //asciidoctor 태스크 수행 전 test 태스크 수행하도록 설정
}
bootJar { //bootJar 태스크 실행시 asciidoctor 태스크가 실행되게 함.
dependsOn asciidoctor
from("${asciidoctor.outputDir}") {
into 'BOOT-INF/classes/static/docs'
}
}