Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
133 lines (114 loc) · 5.23 KB
/
Copy pathbuild.gradle
File metadata and controls
133 lines (114 loc) · 5.23 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
import java.util.Locale;
plugins {
id 'org.springframework.boot' version '3.3.0'
id 'io.spring.dependency-management' version '1.1.5'
id 'java'
id 'jacoco'
id 'checkstyle'
id 'com.diffplug.spotless' version '6.25.0'
}
group = 'com.beachcheck'
version = '0.0.1-SNAPSHOT'
// Testcontainers 버전은 Spring Boot BOM(및 dependency-management 룰)로 고정되므로,
// 필요 시 여기서 명시적으로 override 한다.
ext['testcontainers.version'] = '1.20.5'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-security'
// TODO(OAuth): OAuth 로그인 도입 시 spring-boot-starter-oauth2-client(및 provider 설정) 추가 검토.
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.micrometer:micrometer-tracing-bridge-otel'
implementation 'io.opentelemetry:opentelemetry-exporter-otlp'
implementation platform('net.ttddyy.observation:datasource-micrometer-bom:1.4.1')
implementation 'net.ttddyy.observation:datasource-micrometer-spring-boot'
implementation 'net.ttddyy.observation:datasource-micrometer-opentelemetry'
implementation 'org.springframework.boot:spring-boot-starter-cache'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0'
implementation 'org.flywaydb:flyway-core'
implementation 'org.flywaydb:flyway-database-postgresql'
implementation 'org.hibernate.orm:hibernate-spatial:6.5.2.Final'
implementation 'org.locationtech.jts:jts-core:1.19.0'
implementation 'io.jsonwebtoken:jjwt-api:0.12.5'
implementation 'com.github.ben-manes.caffeine:caffeine:3.1.8' // 로컬 캐시 라이브러리
implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'com.google.firebase:firebase-admin:9.7.0' // Firebase Admin SDK
implementation 'org.springframework.retry:spring-retry' // 스프링 재시도 라이브러리
implementation 'org.springframework.boot:spring-boot-starter-aop' // 스프링 AOP 스타터(의존성 명시를 위해 추가)
// 로깅 — prod 프로파일에서 NDJSON 출력
// 7.4: Logback 1.5.x(Spring Boot 3.3 동봉)와 호환되는 안정 버전
implementation 'net.logstash.logback:logstash-logback-encoder:7.4'
// AWS SDK v2 — Lambda Function URL SigV4 인증
implementation platform('software.amazon.awssdk:bom:2.42.23')
implementation 'software.amazon.awssdk:auth'
implementation 'software.amazon.awssdk:regions'
implementation 'software.amazon.awssdk:sso' // SSO 프로파일 자격증명 로더
implementation 'software.amazon.awssdk:ssooidc' // OIDC 토큰 갱신 지원
// Testcontainers
testImplementation 'org.springframework.boot:spring-boot-testcontainers'
testImplementation 'org.testcontainers:junit-jupiter'
testImplementation 'org.testcontainers:postgresql'
// 테스트용 캐시 헬퍼에서 타입 안전하게 사용 (Reflection 제거)
testImplementation 'org.springframework:spring-context-support' // CaffeineCache 클래스 제공
testImplementation 'com.github.ben-manes.caffeine:caffeine:3.1.8'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.5'
runtimeOnly 'org.postgresql:postgresql'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
}
spotless{
java {
googleJavaFormat('1.22.0')
target 'src/**/*.java'
}
}
tasks.named('test') {
useJUnitPlatform()
finalizedBy jacocoTestReport // 테스트 후 리포트 자동 생성
}
jacocoTestReport {
dependsOn test
reports {
html.required = true
xml.required = true
csv.required = false
}
}
tasks.withType(Test).configureEach {
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
// Docker Desktop 29+는 Docker API 최소 버전이 1.44. Testcontainers 내부(shaded docker-java)의 기본값(1.41)이면
// /v1.41/* 호출에서 400이 나며 "valid Docker environment"를 못 찾는다.
systemProperty 'api.version', '1.44'
}
tasks.register('reservationServiceTest', Test) {
useJUnitPlatform()
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
include("**/ReservationServiceTest.class")
}
tasks.register('installGitHooks', Exec) {
def osName = System.getProperty('os.name').toLowerCase(Locale.ROOT)
if (osName.contains('windows')) {
commandLine "powershell.exe", "-ExecutionPolicy", "Bypass", "-File", "./scripts/install-githooks.ps1"
} else {
commandLine "sh", "./scripts/install-githooks.sh"
}
}
checkstyle {
toolVersion = '10.17.0'
configFile = file('config/checkstyle/checkstyle.xml')
}