-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
executable file
·57 lines (46 loc) · 1.84 KB
/
build.gradle
File metadata and controls
executable file
·57 lines (46 loc) · 1.84 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
// 미리 구성해놓은 task들의 모음이며, 특정 필드과정에 필요한 기본정보를 포함
plugins {
id 'java' // 테스트, 번들링 기능과 함꼐 Java 컴파일을 추가, 다른 JVM 언어 플러그인의 기반이 됨
id 'org.springframework.boot' version '3.3.5' // 실행가능한 jar, war로 패키징하여 애플리케이션 실행이 가능하도록 하며, spring-boot-dependencies 기반의 의존성 관리를 사용함.
id 'io.spring.dependency-management' version '1.1.6' // 자동으로 spring-boot-dependencies bom을 끌어와 버전 관리를 해줌
}
bootJar.enabled = false // 실행가능한 jar로 생성하는 옵션. main이 없는 라이브러리는 false로 비활성화.
jar.enabled = false // 외부에서 의존하기 위한 jar로 생성하는 옵션
// 현재 root 프로젝트와 앞으로 추가될 서브 모듈에 대한 설정
allprojects {
// 프로젝트에서 사용할 JDK 버전 설정
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
// 라이브러리들을 받아올 원격 저장소 설정
repositories {
mavenCentral()
}
}
subprojects {
group = 'com.owing'
version = '0.0.1-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
// 모든 서브 모듈에서 사용되는 공통 의존성
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
// Dotenv 파일 관리
implementation 'io.github.cdimascio:dotenv-java:3.1.0'
}
test {
useJUnitPlatform()
}
}