forked from TEAMPICKL/PICKL_BE
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
150 lines (118 loc) · 4.42 KB
/
build.gradle
File metadata and controls
150 lines (118 loc) · 4.42 KB
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
plugins {
id 'java'
id 'org.springframework.boot' version '3.5.4'
id 'io.spring.dependency-management' version '1.1.7'
id 'com.diffplug.spotless' version '6.19.0'
}
group = 'com.likelion'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
// ==== Spring Boot Starters ====
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation "org.springframework.boot:spring-boot-starter-cache"
implementation 'org.springframework.boot:spring-boot-starter-actuator'
// ==== Database ====
// MySQL JDBC 드라이버
runtimeOnly 'com.mysql:mysql-connector-j'
// ==== Flyway (DB 마이그레이션) ====
// - flyway-core: 마이그레이션 엔진
// - flyway-mysql: MySQL 전용 기능/방언 분리 모듈 (Flyway 10+)
implementation 'org.flywaydb:flyway-core'
implementation 'org.flywaydb:flyway-mysql'
// 레이트리미트/재시도
implementation "io.github.resilience4j:resilience4j-reactor:2.2.0"
implementation "io.github.resilience4j:resilience4j-ratelimiter:2.2.0"
implementation "io.github.resilience4j:resilience4j-bulkhead:2.2.0"
// Geometry
implementation "org.locationtech.jts:jts-core:1.19.0"
implementation "org.hibernate.orm:hibernate-spatial:6.6.22.Final"
// csv 정제
implementation "org.springframework.boot:spring-boot-starter-webflux" // WebClient
implementation "org.apache.commons:commons-csv:1.11.0"
implementation "org.slf4j:slf4j-api:2.0.13"
implementation "com.jayway.jsonpath:json-path:2.9.0"
// 원본 좌표 코드
implementation "org.locationtech.proj4j:proj4j:1.3.0"
implementation "org.locationtech.proj4j:proj4j-epsg:1.3.0"
// ==== Lombok ====
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
// ==== Swagger / OpenAPI ====
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.1'
// ==== JWT (JSON Web 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'
// ==== s3 ====
implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE'
implementation 'com.amazonaws:aws-java-sdk-s3:1.12.463'
// ==== Netty native DNS for macOS (Netty가 네이티브 DNS 리졸버를 사용) ====
// Spring Boot의 dependency management가 Netty 버전을 맞춰주므로 버전 표기는 생략
implementation "io.netty:netty-resolver-dns-native-macos::osx-aarch_64"
// ==== Cache ====
implementation "com.github.ben-manes.caffeine:caffeine:3.1.8"
// ==== Test ====
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
tasks.named('test') {
useJUnitPlatform()
}
tasks.named('compileJava') {
dependsOn 'spotlessApply'
}
// Spotless 설정
spotless {
java {
googleJavaFormat()
importOrder('java', 'javax', 'jakarta', 'org.springframework', 'com.likelion', 'com')
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
}
}
check.dependsOn 'spotlessCheck'
// 환경 설정 파일 복사
tasks.register('copyResources', Copy) {
from './PICKL_BE_Config'
include '*.properties'
into 'src/main/resources/'
}
// Spring build, bootRun 전 복사되도록 연결
processResources {
dependsOn 'copyResources'
}
tasks.named('bootRun') {
dependsOn 'copyResources'
}
// 테스트 실행 시 profile 지정 가능하게
test {
doFirst {
def profile = project.hasProperty('profile') ? project.property('profile').toString() : 'local'
jvmArgs = ["-Dspring.profiles.active=${profile}"]
}
}
tasks.withType(JavaExec) {
jvmArgs += ["-Dfile.encoding=UTF-8"]
}
tasks.named('bootRun') {
args '--spring.profiles.active=local'
systemProperty 'spring.config.additional-location', "file:${projectDir}/PICKL_BE_Config/"
}