-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
111 lines (89 loc) · 3.73 KB
/
Copy pathbuild.gradle
File metadata and controls
111 lines (89 loc) · 3.73 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
// Spring Boot 3.4.5 + Java 21 빌드 스크립트
plugins {
id 'org.springframework.boot' version '3.4.5'
id 'io.spring.dependency-management' version '1.1.7'
id 'com.diffplug.spotless' version '6.19.0'
id 'java'
}
group = 'com.swez'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
repositories {
mavenCentral()
}
dependencies {
// REST API 응답을 위한 최소 web 스타터 — Tomcat 내장 서버 포함
implementation 'org.springframework.boot:spring-boot-starter-web'
// @Valid, @Validated 유효성 검증 활성화
implementation 'org.springframework.boot:spring-boot-starter-validation'
// API 문서 자동 생성 (Spring Boot 3.x 전용)
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.8'
// JPA + PostgreSQL
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
runtimeOnly 'org.postgresql:postgresql'
// Redis
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
// ULID 생성
implementation 'com.github.f4b6a3:ulid-creator:5.2.3'
// Google ID Token 검증
implementation 'com.google.api-client:google-api-client:2.7.0'
// Spring Security
implementation 'org.springframework.boot:spring-boot-starter-security'
// JWT
implementation 'io.jsonwebtoken:jjwt-api:0.12.6'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.6'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.6'
// OAuth2 클라이언트 (Google, Kakao)
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
// AWS S3 — 음성 샘플 파일 업로드
implementation platform('software.amazon.awssdk:bom:2.31.0')
implementation 'software.amazon.awssdk:auth'
implementation 'software.amazon.awssdk:regions'
implementation 'software.amazon.awssdk:s3'
// JSON 구조화 로깅 (운영 환경)
implementation 'net.logstash.logback:logstash-logback-encoder:8.0'
// Flyway (PostgreSQL 전용 모듈 포함)
implementation 'org.flywaydb:flyway-core'
implementation 'org.flywaydb:flyway-database-postgresql'
// 보일러플레이트 코드 제거
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
// 테스트 — JUnit5, Mockito, AssertJ 포함
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
// ArchUnit — 도메인 패키지 간 의존 방향 검증 (순환 의존 / 경계 위반 방지)
testImplementation 'com.tngtech.archunit:archunit-junit5:1.3.0'
}
// bootJar 태스크는 Dockerfile의 ./gradlew bootJar --no-daemon 호출과 맞춰 기본 설정을 유지한다
tasks.named('bootJar') {
archiveFileName = 'app.jar'
}
// JUnit 5 플랫폼 사용 — spring-boot-starter-test가 제공하는 JUnit Jupiter 러너 활성화
tasks.named('test') {
useJUnitPlatform()
}
spotless {
java {
// Google JAVA Format 적용
googleJavaFormat()
// 아래 순서로 import 문 정렬
importOrder('java', 'javax', 'jakarta', 'org', 'com')
// 사용하지 않는 import 제거
removeUnusedImports()
// 각 라인 끝에 있는 공백을 제거
trimTrailingWhitespace()
// 파일 끝에 새로운 라인 추가
endWithNewline()
// 라이선스 헤더 추가
licenseHeader '/* \n * Copyright (c) EZ TEAM \n */'
// 어노테이션 정렬을 일관성 있게 유지
formatAnnotations()
// 들여쓰기를 공백 2칸으로 고정
indentWithSpaces(2)
// 파일 인코딩을 UTF-8로 강제
encoding 'UTF-8'
}
}