-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
114 lines (102 loc) · 4.31 KB
/
Copy pathbuild.gradle
File metadata and controls
114 lines (102 loc) · 4.31 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
108
109
110
111
112
113
114
// 그레들 빌드에 필요한 플러그인을 로드한다.
// 그레들 내장 플러그인 이외의 플러그인을 말한다.
// #################################################
plugins {
id 'org.springframework.boot' version "2.2.2.RELEASE"
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
}
// #################################################
// profile 별로 로드해야할 속성을 지정한다.
// #################################################
// def url = new File('config/env.conf').toURL()
// def config = new configSlurper("${env}").parse(url)
// #################################################
// 공통으로 사용하는 라이브러리에 대한 버전을 공통으로 강제한다.
// #################################################
project.ext {
javaVersion = "11"
encoding = "UTF-8"
tmpDir = System.getProperty('java.io.tmpdir')
versions = [
springBoot : '2.3.0.RELEASE',
jdbc : '1.1.3.RELEASE',
commonsLang3 : '3.9',
commonsCollections : '3.2',
javaxServletApi : '3.1.0',
guava : '28.2-jre',
lombok : '1.18.10',
mysqlConnectorJava : '5.1.47',
snakeyaml : '1.19',
logbackClassic : '1.2.3',
mysql : '5.1.16',
httpclient : '4.5.10',
junitJupiter : '5.5.2',
h2 : '1.4.200',
]
}
// #################################################
// 공통 빌드환경에 대한 부분을 정의한다.
// - 통합테스트 or Rest API doc 를 위한 빌드 경로 추가가 필요한 경우
// #################################################
// sourceSets{
// // /src/integrationTest/java 경로에서 빌드 소스를 찾는다.
// integrationTest
// // /src/integrationTest/java 경로에서 빌드 소스를 찾는다. 빌드 소스 경로를 명시적으로 지정하였다.
// integrationTest {
// java.srcDir file('src/integrationTest/java')
// }
// }
// #################################################
// 각 프로젝트에 종속되지 않는 공용 설정을 정의한다. (프로젝트 설정 중복 제거)
// #################################################
subprojects {
// gradle wrapper configuration
// gradlew wrapper --gradle-version=5.6
task wrapper(type: Wrapper) {
gradleVersion = '5.6'
}
// common subprojects plugin
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'eclipse-wtp'
apply plugin: 'idea'
// subproject dep setup
//To models Dep...
if (name.endsWith("core") || name.endsWith("interface")) {
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
}
compileJava.options.encoding = 'UTF-8'
// specifies that version of the Java programming language be used to compile
sourceCompatibility = javaVersion
// The option ensures that the generated class files will be compatible with VMs specified by targetCompatibility
targetCompatibility = javaVersion
repositories {
mavenCentral()
maven { url "http://repo.spring.io/snapshot" }
maven { url "http://repo.spring.io/milestone" }
}
// #################################################
// 라이브러리 의존관계에 대한 전략을 정의한다.
// 초기 개발 시에는 이부분을 확인할 필요하기 있다. 기본 값은 Newest 로 최신 버전을 선택한다.
// #################################################
configurations {
compileOnly {
// Lombok
extendsFrom annotationProcessor
}
all {
resolutionStrategy {
// 의존 관계에 있는 라이브러리 버전에 대한 영향도가 큰 경우 잠재적 버그를 방지하기 위해서 필요하다.
// 의존성 조회 ./gradlew app:dependencies
// failOnVersionConflict()
// 사용할 버전을 강제하고 싶은 경우
// force '라이브러리 group:artifact:version'
cacheChangingModulesFor 0, 'seconds'
}
}
}
test {
useJUnitPlatform()
}
}