-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
107 lines (86 loc) · 3.4 KB
/
build.gradle
File metadata and controls
107 lines (86 loc) · 3.4 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.10'
id 'io.spring.dependency-management' version '1.1.6'
}
group = 'com.fortickets'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
// 현재의 root 프로젝트와 앞으로 추가될 서브 모듈에 대한 설정
allprojects {
sourceCompatibility = '17'
targetCompatibility = '17'
repositories {
mavenCentral()
}
}
subprojects {
// apply plugin: Gradle에 특정 기능을 추가하는 플러그인을 적용
apply plugin: 'java'
// api 사용하기 위해 추가
apply plugin: 'java-library'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
// 모든 서브 모듈에서 사용될 공통 의존성들을 추가함
dependencies {
// 유레카와 게이트웨이를 제외한 서비스에 common 모듈 추가
if (project.path.startsWith(':application:') && project.name != 'eureka' && project.name != 'gateway-service') {
implementation project(':component:common')
}
// zipkin 관련 의존성 추가
implementation 'io.zipkin.reporter2:zipkin-reporter-brave'
implementation 'io.micrometer:micrometer-tracing-bridge-brave'
// lombok
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
// mapStruct
implementation 'org.mapstruct:mapstruct:1.5.5.Final'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.5.5.Final'
// Test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
if (project.name != 'gateway-service') {
// spring web mvc
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-web'
}
if (project.path.startsWith(':application:')) {
if (project.name == 'eureka') {
//eureka server
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-server'
} else {
//eureka client
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
implementation project(':component:redis')
}
//openFeign
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
}
// actuator
implementation 'org.springframework.boot:spring-boot-starter-actuator'
// prometheus
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
// queryDSL
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
annotationProcessor "com.querydsl:querydsl-apt:5.0.0:jakarta"
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
}
ext {
set('springCloudVersion', "2023.0.0")
set('eurekaClientVersion', "4.1.0")
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
// 모든 서브 모듈에서 Junit을 사용하기 위한 설정
test {
useJUnitPlatform()
}
}