|
1 | 1 | plugins { |
2 | | - id 'java' |
3 | | - id 'org.springframework.boot' version '3.2.5'//스웨거로 인해 버전 낮춤 |
4 | | - id 'io.spring.dependency-management' version '1.1.7' |
5 | | -} |
6 | | - |
7 | | -ext { |
8 | | - queryDslVersion = "5.0.0" |
| 2 | + id 'java' |
| 3 | + id 'org.springframework.boot' version '3.2.5' // 스웨거로 인해 버전 낮춤 |
| 4 | + id 'io.spring.dependency-management' version '1.1.7' |
9 | 5 | } |
10 | 6 |
|
11 | 7 | group = 'com.example' |
12 | 8 | version = '0.0.1-SNAPSHOT' |
13 | 9 |
|
14 | 10 | java { |
15 | | - toolchain { |
16 | | - languageVersion = JavaLanguageVersion.of(21) |
17 | | - } |
| 11 | + toolchain { |
| 12 | + languageVersion = JavaLanguageVersion.of(21) |
| 13 | + } |
18 | 14 | } |
19 | 15 |
|
20 | 16 | ext { |
21 | | - queryDslVersion = "5.0.0" |
| 17 | + queryDslVersion = "5.0.0" |
22 | 18 | } |
23 | 19 |
|
24 | 20 | configurations { |
25 | | - compileOnly { |
26 | | - extendsFrom annotationProcessor |
27 | | - } |
| 21 | + compileOnly { |
| 22 | + extendsFrom annotationProcessor |
| 23 | + } |
28 | 24 | } |
29 | 25 |
|
30 | 26 | repositories { |
31 | | - mavenCentral() |
32 | | - |
33 | | - // springdoc 2.5.0은 여기서 제공됨 |
34 | | - maven { url 'https://repo.spring.io/release' } |
| 27 | + mavenCentral() |
| 28 | + // springdoc 2.5.0은 여기서 제공됨 |
| 29 | + maven { url 'https://repo.spring.io/release' } |
35 | 30 | } |
36 | 31 |
|
37 | 32 | dependencies { |
38 | | - // Spring Boot |
39 | | - implementation 'org.springframework.boot:spring-boot-starter-data-jpa' |
40 | | - implementation 'org.springframework.boot:spring-boot-starter-security' |
41 | | - implementation 'org.springframework.boot:spring-boot-starter-web' |
42 | | - implementation 'org.springframework.boot:spring-boot-starter-validation' |
43 | | - |
44 | | - // JWT |
45 | | - implementation 'io.jsonwebtoken:jjwt-api:0.11.5' |
46 | | - runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5' |
47 | | - runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5' |
48 | | - |
49 | | - // DB |
50 | | - runtimeOnly 'com.h2database:h2' |
51 | | - runtimeOnly 'com.mysql:mysql-connector-j' |
52 | | - |
53 | | - // AWS |
54 | | - implementation 'com.amazonaws:aws-java-sdk-s3:1.12.538' |
55 | | - |
56 | | - // QueryDSL |
57 | | - implementation "com.querydsl:querydsl-jpa:${queryDslVersion}:jakarta" |
58 | | - annotationProcessor "com.querydsl:querydsl-apt:${queryDslVersion}:jakarta" |
59 | | - annotationProcessor "jakarta.annotation:jakarta.annotation-api" |
60 | | - annotationProcessor "jakarta.persistence:jakarta.persistence-api" |
61 | | - |
62 | | - // Swagger (springdoc) |
63 | | - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0' |
64 | | - |
65 | | - // Lombok |
66 | | - compileOnly 'org.projectlombok:lombok' |
67 | | - annotationProcessor 'org.projectlombok:lombok' |
68 | | - |
69 | | - // Test |
70 | | - testImplementation 'org.springframework.boot:spring-boot-starter-test' |
71 | | - testRuntimeOnly 'org.junit.platform:junit-platform-launcher' |
| 33 | + // Spring Boot |
| 34 | + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' |
| 35 | + implementation 'org.springframework.boot:spring-boot-starter-security' |
| 36 | + implementation 'org.springframework.boot:spring-boot-starter-web' |
| 37 | + implementation 'org.springframework.boot:spring-boot-starter-validation' |
| 38 | + |
| 39 | + // JWT |
| 40 | + implementation 'io.jsonwebtoken:jjwt-api:0.11.5' |
| 41 | + runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5' |
| 42 | + runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5' |
| 43 | + |
| 44 | + // DB |
| 45 | + runtimeOnly 'com.h2database:h2' |
| 46 | + runtimeOnly 'com.mysql:mysql-connector-j' |
| 47 | + |
| 48 | + // AWS |
| 49 | + implementation 'com.amazonaws:aws-java-sdk-s3:1.12.538' |
| 50 | + |
| 51 | + // QueryDSL |
| 52 | + implementation "com.querydsl:querydsl-jpa:${queryDslVersion}:jakarta" |
| 53 | + annotationProcessor "com.querydsl:querydsl-apt:${queryDslVersion}:jakarta" |
| 54 | + annotationProcessor "jakarta.annotation:jakarta.annotation-api" |
| 55 | + annotationProcessor "jakarta.persistence:jakarta.persistence-api" |
| 56 | + |
| 57 | + // Swagger (springdoc) |
| 58 | + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0' |
| 59 | + |
| 60 | + // Lombok |
| 61 | + compileOnly 'org.projectlombok:lombok' |
| 62 | + annotationProcessor 'org.projectlombok:lombok' |
| 63 | + |
| 64 | + // Test |
| 65 | + testImplementation 'org.springframework.boot:spring-boot-starter-test' |
| 66 | + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' |
| 67 | +} |
72 | 68 |
|
| 69 | +// 테스트 설정 (JUnit 플랫폼 사용) |
73 | 70 | tasks.named('test') { |
74 | | - useJUnitPlatform() |
| 71 | + useJUnitPlatform() |
75 | 72 | } |
76 | 73 |
|
77 | | -// WAR 파일 안 만들게 설정 |
| 74 | +// WAR 파일 비활성화 (jar만 생성) |
78 | 75 | jar { |
79 | | - enabled = false |
| 76 | + enabled = false |
80 | 77 | } |
81 | 78 |
|
82 | 79 | // QueryDSL 설정 |
83 | 80 | def querydslDir = "src/main/generated" |
84 | 81 |
|
85 | 82 | sourceSets { |
86 | | - main { |
87 | | - java { |
88 | | - srcDirs += querydslDir |
89 | | - } |
90 | | - } |
| 83 | + main { |
| 84 | + java { |
| 85 | + srcDirs += querydslDir |
| 86 | + } |
| 87 | + } |
91 | 88 | } |
92 | 89 |
|
93 | 90 | tasks.withType(JavaCompile).configureEach { |
94 | | - options.annotationProcessorGeneratedSourcesDirectory = file(querydslDir) |
| 91 | + options.annotationProcessorGeneratedSourcesDirectory = file(querydslDir) |
95 | 92 | } |
96 | | - |
97 | | - |
0 commit comments