-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
192 lines (156 loc) · 5.59 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
/* 전체 프로젝트 의존성 관리 */
buildscript {
ext {
springBootVersion = '2.3.4.RELEASE'
springfoxVersion = '2.9.2'
swaggerVersion = '1.5.21'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath "io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE"
}
}
allprojects {
apply plugin: 'java'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.springframework.boot'
group 'kr.seok'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.springframework.boot'
group 'kr.seok'
version '1.0-SNAPSHOT'
sourceCompatibility = '1.8'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
dependencies {
/* SpringFramework */
implementation 'org.springframework.boot:spring-boot-starter-batch'
implementation "org.springframework.boot:spring-boot-starter-data-jpa"
implementation "javax.validation:validation-api"
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
/* Excel*/
implementation "org.apache.poi:poi:5.1.0" // .xlsx
implementation "org.apache.poi:poi-ooxml:5.1.0" // .xls
runtimeOnly 'com.h2database:h2'
runtimeOnly 'mysql:mysql-connector-java'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.batch:spring-batch-test'
}
test {
useJUnitPlatform()
}
}
/* Querydsl 프로젝트 리스트 */
def querydslProjects = [
project(":batch-hospital"),
project(":batch-admin")
]
configure(querydslProjects) {
apply plugin: "io.spring.dependency-management"
dependencies {
compileOnly "com.querydsl:querydsl-jpa"
compileOnly "com.querydsl:querydsl-core"
annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jpa"
// querydsl JPAAnnotationProcessor 사용 지정
annotationProcessor "jakarta.persistence:jakarta.persistence-api:2.2.3"
annotationProcessor "jakarta.annotation:jakarta.annotation-api:1.3.5"
}
// querydsl 적용
def generated = 'src/main/generated'
sourceSets {
main.java.srcDirs += [generated]
}
tasks.withType(JavaCompile) {
options.annotationProcessorGeneratedSourcesDirectory = file(generated)
}
clean.doLast {
file(generated).deleteDir()
file('out').deleteDir()
}
}
project(":batch-common") {
/* DTO, Util 클래스 등등 */
bootJar { enabled = false }
jar { enabled = true }
}
project(":batch-core") {
/* 서비스 비즈니스 로직과 관계가 없음, 하나의 인프라 스트럭쳐에 대한 책임만 갖는다. (DB Server, Redis, ElasticSearch 등등) */
dependencies {
implementation project(":batch-common")
}
}
project(":batch-admin") {
/* API용 비즈니스 로직관련 모듈 swagger */
dependencies {
implementation project(":batch-common")
developmentOnly 'org.springframework.boot:spring-boot-devtools'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation "io.springfox:springfox-swagger2:${springfoxVersion}"
implementation "io.springfox:springfox-swagger-ui:${springfoxVersion}"
implementation "io.swagger:swagger-annotations:${swaggerVersion}"
implementation "io.swagger:swagger-models:${swaggerVersion}"
}
}
project(":batch-hospital") {
dependencies {
implementation project(":batch-common")
implementation 'org.apache.httpcomponents:httpclient:4.5.13'
/* https://mvnrepository.com/artifact/org.modelmapper.extensions/modelmapper-spring */
implementation 'org.modelmapper.extensions:modelmapper-spring:1.1.0'
implementation 'org.springframework.boot:spring-boot-starter-data-elasticsearch'
// es 의존성 추가시 배치가 끝나지 않는 문제 발생
implementation 'org.elasticsearch:elasticsearch:7.6.2'
implementation 'org.elasticsearch.client:elasticsearch-rest-client:7.6.2'
implementation 'org.elasticsearch.client:elasticsearch-rest-high-level-client:7.6.2'
}
}
project(":batch-hospital-es") {
dependencies {
implementation project(":batch-common")
implementation 'org.springframework.boot:spring-boot-starter-data-elasticsearch'
implementation 'org.springframework.boot:spring-boot-starter-data-elasticsearch'
// https://mvnrepository.com/artifact/org.elasticsearch/elasticsearch
implementation 'org.elasticsearch:elasticsearch:7.6.2'
implementation 'org.elasticsearch.client:elasticsearch-rest-high-level-client:7.6.2'
}
}
project(":batch-library") {
dependencies {
implementation project(":batch-common")
}
}
project(":batch-library-jpa") {
dependencies {
implementation project(":batch-common")
}
}
project(":batch-library-test") {
dependencies {
implementation project(":batch-common")
}
}
project(":batch-real-estate") {
dependencies {
implementation project(":batch-common")
}
}
project(":batch-mail-service") {
dependencies {
implementation project(":batch-common")
}
}