forked from sxfad/porter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
99 lines (88 loc) · 2.79 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
apply plugin: 'java'
apply plugin: 'maven'
version '4.0'
configurations.all {
resolutionStrategy {
force 'xml-apis:xml-apis:1.4.01'
}
}
repositories {
maven{ url"http://maven.aliyun.com/nexus/content/groups/public"}
}
buildscript {
repositories {
maven{ url"http://maven.aliyun.com/nexus/content/groups/public"}
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.1.3.RELEASE"
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'checkstyle'
ext {
group = 'cn.vbill.middleware.porter'
junitVersion = '4.12'
version '4.0'
springVersion = '2.1.3.RELEASE'
swaggerVersion = '2.7.0'
canalVersion = '1.1.0'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
maven{ url"http://maven.aliyun.com/nexus/content/groups/public"}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
dependencies {
compile (
'com.alibaba:fastjson:1.2.28',
'com.alibaba:druid:1.1.14',
'org.apache.commons:commons-lang3:3.7',
"org.springframework.boot:spring-boot-starter:${springVersion}",
"org.springframework.boot:spring-boot-starter-jdbc:${springVersion}",
'commons-beanutils:commons-beanutils:1.9.2',
"org.springframework.boot:spring-boot-starter-mail:${springVersion}",
'mysql:mysql-connector-java:5.1.45'
)
compile files(rootProject.getRootDir().path+'/other_dependencies/ojdbc7.jar')
compile('org.apache.zookeeper:zookeeper:3.4.11'){
exclude group:'org.slf4j',module:'slf4j-api'
exclude group:'org.slf4j',module:'slf4j-log4j12'
exclude group:'log4j',module:'log4j'
}
compileOnly 'org.projectlombok:lombok:1.16.20'
annotationProcessor 'org.projectlombok:lombok:1.16.20'
testCompile "junit:junit:${junitVersion}"
}
//将子项目包复制到根目录
build.doLast {
def rootPath = rootProject.buildDir.getPath() + "/distributions"
copy {
from buildDir.getPath() + "/distributions" into rootPath
}
}
clean.doFirst {
delete "${buildDir}/../out"
}
checkstyle {
toolVersion = 7.7
ignoreFailures = true
configFile = file(rootProject.getRootDir().getPath() + "/checkstyle.xml")
}
test {
ignoreFailures true
}
uploadArchives {
repositories {
mavenDeployer {
mavenLocal()
}
}
}
}