-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
153 lines (125 loc) · 5.32 KB
/
build.gradle
File metadata and controls
153 lines (125 loc) · 5.32 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
151
152
plugins {
id 'java'
id 'org.springframework.boot' version '4.0.0'
id 'io.spring.dependency-management' version '1.1.7'
}
group = 'me.jisung'
version = '1.0.0-RELEASE'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
repositories {
mavenCentral()
}
// QueryDSL Q 클래스 생성을 위한 별도 configuration
configurations {
querydslApt
}
dependencies {
/*
* Gradle 의존성 선언 키워드 설명:
*
* - implementation: 컴파일 타임과 런타임 모두 필요. 내부 구현에 사용되며 다른 모듈에 노출되지 않음 (가장 많이 사용)
* - compileOnly: 컴파일 타임에만 필요. 런타임에는 이미 제공되거나 불필요한 라이브러리 (예: Lombok)
* - runtimeOnly: 런타임에만 필요. 컴파일에는 불필요하고 실행 시에만 사용 (예: JDBC 드라이버)
* - annotationProcessor: 어노테이션 처리기. 컴파일 타임에 어노테이션을 분석하여 코드 생성 (예: Lombok, MapStruct, QueryDSL)
* - testImplementation: 테스트 컴파일/런타임에만 필요. 프로덕션 코드에는 포함되지 않음
* - testRuntimeOnly: 테스트 런타임에만 필요. 테스트 실행 시에만 사용되는 라이브러리
*/
// spring starters
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-aop'
implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
implementation 'org.springframework.boot:spring-boot-starter-amqp'
implementation 'org.springframework.kafka:spring-kafka'
// Database
implementation 'com.mysql:mysql-connector-j'
implementation 'org.postgresql:postgresql:42.7.8'
// AWS - Nov 30, 2025 released
implementation 'io.awspring.cloud:spring-cloud-aws-starter:3.4.2'
// Prometheus - Nov 06, 2025 released
implementation 'io.micrometer:micrometer-registry-prometheus:1.16.0'
// websocket
implementation 'org.springframework.boot:spring-boot-starter-websocket'
implementation 'org.webjars:stomp-websocket:2.3.3'
implementation 'org.webjars:sockjs-client:1.1.2'
// mapper(lombok, mapstruct)
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
implementation 'org.mapstruct:mapstruct:1.6.3'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.6.3'
// JWT - Aug 20, 2025 released
implementation 'io.jsonwebtoken:jjwt-api:0.13.0'
implementation 'io.jsonwebtoken:jjwt-impl:0.13.0'
implementation 'io.jsonwebtoken:jjwt-jackson:0.13.0'
// Excel - Nov 30, 2025 released
implementation 'org.apache.poi:poi:5.5.1'
implementation 'org.apache.poi:poi-ooxml:5.5.1'
// AWS - Nov 30, 2025 released
implementation 'io.awspring.cloud:spring-cloud-aws-starter:3.4.2'
implementation 'software.amazon.awssdk:s3:2.40.4'
// json
implementation 'com.google.code.gson:gson'
// OpenFeign QueryDSL - Oct 27, 2025 released
implementation 'io.github.openfeign.querydsl:querydsl-jpa:7.1'
querydslApt 'io.github.openfeign.querydsl:querydsl-apt:7.1'
querydslApt "jakarta.annotation:jakarta.annotation-api"
querydslApt "jakarta.persistence:jakarta.persistence-api"
// file
implementation 'org.apache.tika:tika-core:3.2.2'
// jasypt - environment value encrypt helper
implementation 'com.github.ulisesbocchio:jasypt-spring-boot-starter:3.0.5'
// QR Code
implementation 'com.google.zxing:core:3.5.3'
implementation 'com.google.zxing:javase:3.5.3'
// bucket4j
implementation 'com.bucket4j:bucket4j_jdk17-core:8.16.1'
// test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
// QueryDSL Q 클래스 생성 디렉토리
def querydslDir = layout.buildDirectory.dir("generated/sources/querydsl/java/main").get().asFile
// QueryDSL Q 클래스 생성 태스크
tasks.register('generateQueryDSL', JavaCompile) {
group = 'build'
source = sourceSets.main.java
classpath = configurations.compileClasspath
destinationDirectory = file(querydslDir)
options.annotationProcessorPath = configurations.querydslApt
options.compilerArgs = [
'-proc:only',
'-processor', 'com.querydsl.apt.jpa.JPAAnnotationProcessor'
]
doFirst {
querydslDir.mkdirs()
}
}
// compileJava 전에 Q 클래스 생성
tasks.named('compileJava') {
dependsOn tasks.named('generateQueryDSL')
}
// 생성된 Q 클래스를 소스셋에 추가
sourceSets {
main {
java {
srcDirs += querydslDir
}
}
}
// clean 시 생성된 Q 클래스도 삭제
tasks.named('clean') {
delete querydslDir
}
tasks.named('test') {
useJUnitPlatform()
}