-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
132 lines (109 loc) · 4.37 KB
/
build.gradle
File metadata and controls
132 lines (109 loc) · 4.37 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.5.9'
id 'io.spring.dependency-management' version '1.1.7'
id 'com.diffplug.spotless' version '6.25.0'
}
group = 'inha'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
/* ===== Version Pins (필요한 것만) ===== */
ext {
awspringBomVersion = '3.4.2'
springdocVersion = '2.8.15'
flywayVersion = '11.19.0'
postgresVersion = '42.7.3'
hibernateTypes60 = '2.21.1'
dotenvVersion = '5.2.2'
querydslVersion = '6.10.1'
jjwtVersion = '0.13.0'
googleApiClientVersion = '2.6.0'
}
/* ===== Vulnerability Pins (정확한 CVE 기반 대응) ===== */
configurations.configureEach {
resolutionStrategy {
// CVE-2024-47554 대응 (commons-compress 체인 영향 → commons-lang3 3.18.0 필요)
force 'org.apache.commons:commons-lang3:3.18.0'
// springdoc transitive classgraph 취약점 대응 버전으로 상향
force 'io.github.classgraph:classgraph:4.8.179'
}
}
dependencies {
// --- Spring Boot 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-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-mail'
// --- Swagger / OpenAPI (springdoc) ---
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:${springdocVersion}") {
exclude group: "org.apache.commons", module: "commons-lang3"
}
implementation "org.apache.commons:commons-lang3:3.18.0"
// --- DB & JPA Utils (Boot 관리 버전과 동기화 필요) ---
implementation "com.vladmihalcea:hibernate-types-60:${hibernateTypes60}"
implementation "org.postgresql:postgresql:${postgresVersion}"
testRuntimeOnly 'com.h2database:h2' // 테스트 환경 전용, 운영 패키지에서는 제외
// --- Cache / Redis ---
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
// --- Querydsl (OpenFeign fork) ---
implementation "io.github.openfeign.querydsl:querydsl-jpa:${querydslVersion}"
annotationProcessor "io.github.openfeign.querydsl:querydsl-apt:${querydslVersion}:jakarta"
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
// Querydsl APT helper APIs (컴파일 타임만)
compileOnly 'jakarta.annotation:jakarta.annotation-api'
compileOnly 'jakarta.persistence:jakarta.persistence-api'
// --- JWT ---
implementation "io.jsonwebtoken:jjwt-api:${jjwtVersion}"
runtimeOnly "io.jsonwebtoken:jjwt-impl:${jjwtVersion}"
runtimeOnly "io.jsonwebtoken:jjwt-jackson:${jjwtVersion}"
// --- AWS (S3) ---
implementation 'io.awspring.cloud:spring-cloud-aws-starter-s3'
implementation 'software.amazon.awssdk:url-connection-client'
// --- Flyway ---
implementation "org.flywaydb:flyway-core:${flywayVersion}"
implementation "org.flywaydb:flyway-database-postgresql:${flywayVersion}"
// --- 환경변수(.env) ---
implementation "io.github.cdimascio:java-dotenv:${dotenvVersion}"
// --- Lombok ---
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
// --- Test ---
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.mockito:mockito-core:5.6.0'
testImplementation 'org.mockito:mockito-junit-jupiter:5.6.0'
testImplementation 'org.assertj:assertj-core:3.27.7'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
//Google API Client
implementation "com.google.api-client:google-api-client:${googleApiClientVersion}"
}
dependencyManagement {
imports {
mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:${awspringBomVersion}"
}
}
spotless {
java {
googleJavaFormat('1.22.0')
target 'src/**/*.java'
}
}
tasks.test {
useJUnitPlatform()
systemProperty "spring.profiles.active", "test"
}
tasks.withType(JavaCompile).configureEach {
options.generatedSourceOutputDirectory.set(file("build/generated/sources/annotationProcessor/java/main"))
}