@@ -7,70 +7,80 @@ plugins {
77group = ' inha'
88version = ' 0.0.1-SNAPSHOT'
99
10+ /* ===== Java Toolchain ===== */
1011java {
1112 toolchain {
1213 languageVersion = JavaLanguageVersion . of(17 )
1314 }
1415}
1516
17+ /* ===== Configurations ===== */
1618configurations {
1719 compileOnly {
1820 extendsFrom annotationProcessor
1921 }
2022}
2123
24+ /* ===== Repositories ===== */
2225repositories {
2326 mavenCentral()
2427}
2528
29+ /* ===== Dependencies ===== */
2630dependencies {
27- implementation ' org.springframework.boot:spring-boot-starter-data-jpa '
31+ // --- Spring Boot Starters ---
2832 implementation ' org.springframework.boot:spring-boot-starter-web'
29- implementation ' com.vladmihalcea:hibernate-types-60:2.21.1'
30- implementation group : ' org.postgresql' , name : ' postgresql' , version : ' 42.7.3'
31- implementation ' io.github.cdimascio:java-dotenv:5.2.2'
33+ implementation ' org.springframework.boot:spring-boot-starter-data-jpa'
3234 implementation ' org.springframework.boot:spring-boot-starter-validation'
35+ implementation ' org.springframework.boot:spring-boot-starter-oauth2-client'
36+ implementation ' org.springframework.boot:spring-boot-starter-mail'
3337
34- compileOnly ' org.projectlombok:lombok'
35- runtimeOnly ' com.h2database:h2'
36- annotationProcessor ' org.projectlombok:lombok'
38+ // --- DB & JPA Utils ---
39+ implementation ' com.vladmihalcea:hibernate-types-60:2.21.1'
40+ implementation ' org.postgresql:postgresql:42.7.3'
41+ runtimeOnly ' com.h2database:h2' // 테스트/로컬용 인메모리 DB
3742
38- testImplementation ' org.springframework.boot:spring-boot-starter-test'
39- testRuntimeOnly ' org.junit.platform:junit-platform-launcher'
43+ // --- QueryDSL ---
44+ implementation ' com.querydsl:querydsl-jpa:5.0.0:jakarta'
45+ annotationProcessor ' com.querydsl:querydsl-apt:5.0.0:jakarta'
46+ annotationProcessor ' jakarta.annotation:jakarta.annotation-api'
47+ annotationProcessor ' jakarta.persistence:jakarta.persistence-api'
4048
41- testImplementation ' org.mockito:mockito-core:5.6.0 '
42- testImplementation ' org.mockito:mockito-junit-jupiter:5.6.0 '
49+ // --- JWT (JJWT 0.9.x, 레거시 패키지) ---
50+ implementation ' io.jsonwebtoken:jjwt:0.9.1 '
4351
44- testImplementation ' org.assertj:assertj-core:3.24.2'
52+ // --- AWS (S3) ---
53+ implementation ' org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE'
4554
46- // querydsl
47- implementation ' com.querydsl:querydsl-jpa:5.0.0:jakarta'
48- annotationProcessor " com.querydsl:querydsl-apt:5.0.0:jakarta"
49- annotationProcessor " jakarta.annotation:jakarta.annotation-api"
50- annotationProcessor " jakarta.persistence:jakarta.persistence-api"
55+ // --- Flyway (DB Migration) ---
56+ implementation " org.flywaydb:flyway-core:10.21.0"
57+ implementation " org.flywaydb:flyway-database-postgresql:10.21.0"
5158
52- // OAuth
53- implementation ' org.springframework.boot:spring-boot-starter-oauth2-client '
59+ // --- 환경변수(.env) ---
60+ implementation ' io.github.cdimascio:java-dotenv:5.2.2 '
5461
55- // jwt
56- implementation ' io.jsonwebtoken:jjwt:0.9.1'
62+ // --- Lombok ---
63+ compileOnly ' org.projectlombok:lombok'
64+ annotationProcessor ' org.projectlombok:lombok'
5765
66+ // --- Test ---
67+ testImplementation ' org.springframework.boot:spring-boot-starter-test'
68+ testImplementation ' org.mockito:mockito-core:5.6.0'
69+ testImplementation ' org.mockito:mockito-junit-jupiter:5.6.0'
70+ testImplementation ' org.assertj:assertj-core:3.24.2'
71+ testRuntimeOnly ' org.junit.platform:junit-platform-launcher'
72+ }
5873
59- // aws s3
60- implementation ' org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE'
74+ /* ===== Tasks ===== */
6175
62- // mail sender
63- implementation ' org.springframework.boot:spring-boot-starter-mail'
76+ // 테스트: 프로필과 JUnit 플랫폼 한 곳에서 설정
77+ tasks. test {
78+ useJUnitPlatform()
79+ systemProperty " spring.profiles.active" , " test"
6480}
6581
82+ // QueryDSL 생성물 경로 고정
6683tasks. withType(JavaCompile ). configureEach {
6784 options. annotationProcessorGeneratedSourcesDirectory = file(" build/generated/sources/annotationProcessor/java/main" )
6885}
6986
70- tasks. named(' compileJava' ) {
71- dependsOn ' clean'
72- }
73-
74- tasks. named(' test' ) {
75- useJUnitPlatform()
76- }
0 commit comments