-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
99 lines (81 loc) · 1.88 KB
/
build.gradle
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
plugins {
id 'java'
id 'org.springframework.boot' version '2.7.17'
id 'io.spring.dependency-management' version '1.1.3'
id 'java-library'
}
java {
sourceCompatibility = '17'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
tasks.named('test') {
useJUnitPlatform()
}
// 각 모듈에 적용할 공통 설정
subprojects {
group = 'com.example'
version = '0.0.1-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'java-library'
java {
sourceCompatibility = '17'
}
repositories {
mavenCentral()
}
dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
// web
implementation 'org.springframework.boot:spring-boot-starter-web'
}
// gradle 빌드시에는 각 프로젝트를 실행가능한 jar형태로 만들게 되는데, module-common 프로젝트의 경우 main메소드가 없음
// 단순히 참조용 클래스들만 있는 프로젝트를 위해 아래와 같은 설정(bootJar, jar)들을 추가함
bootJar {
enabled = false
}
jar {
enabled = true
}
test {
useJUnitPlatform()
}
}
// 하위 프로젝트간의 의존성을 관리
project(':sample-api') {
dependencies {
implementation project(':sample-application')
}
}
project(':sample-application') {
dependencies {
implementation project(':sample-domain')
implementation project(':sample-infra')
implementation project(':sample-core')
}
}
project(':sample-infra') {
dependencies {
implementation project(':sample-domain')
implementation project(':sample-core')
}
}
project(':sample-core') {
dependencies {
}
}
wrapper {
gradleVersion = '8.3'
distributionUrl = distributionUrl.replace("bin", "all")
}