-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
174 lines (139 loc) · 4.69 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
group 'dolphin'
version '1.0-SNAPSHOT'
buildscript {
ext {
springBootVersion = '1.4.5.RELEASE'
springVersion = '4.3.7.RELEASE'
}
ext['tomcat.version'] = '8.0.35'
repositories {
mavenCentral()
jcenter{
url 'http://jcenter.bintray.com'
}
}
dependencies {
/**
* 从buildscript的repositories中获取jar包
*/
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
def getVersionCode() {
def versionFile = file("$rootDir/version.properties")
if (!versionFile.canRead()) {
throw new GradleException("Could not find version.properties!")
}
def versionProps = new Properties()
versionProps.load(new FileInputStream(versionFile))
def versionCode = versionProps['VERSION'].toString()
return versionCode
}
repositories {
mavenCentral()
}
/***
* 所有子项目的通用配置
*/
allprojects {
apply plugin: 'java'
apply plugin: 'spring-boot'
repositories {
mavenCentral()
}
dependencies {
}
}
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '4.6'
}
project(":common") {
description = ''
dependencies {
compile("org.springframework:spring-context:" + springVersion)
compile("commons-codec:commons-codec:1.10")
compile("org.apache.tomcat:tomcat-juli:" + property('tomcat.version'))
compile 'org.springframework.boot:spring-boot-starter-web'
//compile("javax.servlet:servlet-api: 2.4")
}
}
/*project(":api") {
description = 'dolphin-api'
dependencies {
compile project(":business")
compile project(":data")
compile project(":composite")
compile project(":common")
compile group: 'org.apache.tomcat', name: 'tomcat-juli', version: property('tomcat.version')
compile("org.projectlombok:lombok:1.16.10")
compile("org.springframework.boot:spring-boot-devtools")
compile("org.springframework:spring-test:" + springVersion)
compile("org.springframework.boot:spring-boot-test:" + springBootVersion)
testCompile group: 'junit', name: 'junit', version: '4.12'
}
}*/
project(":composite") {
description = 'dolphin-composite'
dependencies {
compile project(":business")
compile project(":data")
compile("org.springframework:spring-context:" + springVersion)
}
}
project(":web") {
description = "web"
jar {
baseName = "dolphin-web-" + getVersionCode()
}
task copyfile() {
}
dependencies {
compile project(':business')
compile project(':api')
compile project(':common')
compile project(':data')
compile project(':composite')
compile("com.zaxxer:HikariCP:2.6.0")
compile("mysql:mysql-connector-java:5.1.24")
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.boot:spring-boot-starter")
compile group: 'org.apache.tomcat', name: 'tomcat-juli', version: property('tomcat.version')
compile("org.projectlombok:lombok:1.16.14")
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.5'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.24'
compile group: 'org.mybatis', name: 'mybatis', version: '3.4.2'
compile group: 'org.mybatis', name: 'mybatis-typehandlers-jsr310', version: '1.0.2'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
}
project(":business") {
description = "business"
dependencies {
compile project(':data')
compile project(':common')
compile('org.springframework.boot:spring-boot-starter-web')
}
}
project(":data") {
description = "data"
dependencies {
compile project(':dolphin-mybatis')
compile("org.projectlombok:lombok:1.16.14")
compile("com.zaxxer:HikariCP:2.6.0")
compile group: 'postgresql', name: 'postgresql', version: '9.1-901.jdbc4'
//compile("postgresql:postgresql:9.3-1100-jdbc41")
compile("org.hibernate:hibernate-validator:5.2.4.Final")
compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:1.1.1")
compile("org.apache.commons:commons-lang3:3.5")
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.24'
compile group: 'org.mybatis', name: 'mybatis', version: '3.4.2'
compile group: 'org.mybatis', name: 'mybatis-typehandlers-jsr310', version: '1.0.2'
testCompile group: 'junit', name: 'junit', version: '4.11'
}
}
project(":dolphin-mybatis") {
description = "dolphin-mybatis"
dependencies {
}
}