-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
118 lines (101 loc) · 2.91 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
version '1.0'
apply plugin: 'maven'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
sourceCompatibility = 1.8
targetCompatibility = 1.8
[compileJava, compileTestJava, javadoc]*.options*.encoding = 'UTF-8'
// In this section you declare where to find the dependencies of your project
repositories {
maven {
url "http://maven.aliyun.com/nexus/content/groups/public/"
}
mavenLocal()
mavenCentral()
}
def spring_version="4.3.16.RELEASE"
List spring =[
"org.springframework:spring-core:$spring_version",
"org.springframework:spring-beans:$spring_version",
"org.springframework:spring-context:$spring_version",
"org.springframework:spring-tx:$spring_version",
"org.springframework:spring-jdbc:$spring_version",
"org.springframework:spring-web:$spring_version",
"org.springframework:spring-webmvc:$spring_version"
]
List spring_boot =[
"org.springframework.boot:spring-boot-starter-web:1.5.9.RELEASE",
"org.springframework.boot:spring-boot-autoconfigure:1.5.9.RELEASE",
"org.springframework.boot:spring-boot-configuration-processor:1.5.9.RELEASE",
"org.springframework.boot:spring-boot-starter-log4j2:1.5.9.RELEASE"
]
List mysql = [
'org.mybatis:mybatis:3.2.8',
'org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1',
'mysql:mysql-connector-java:5.1.30',
]
List io = [
'commons-io:commons-io:2.6',
'commons-fileupload:commons-fileupload:1.4'
]
dependencies {
compile spring,spring_boot,mysql,io
compile "com.github.briandilley.jsonrpc4j:jsonrpc4j:1.5.1"
compile "org.apache.commons:commons-lang3:3.6"
compile 'com.alibaba:fastjson:1.2.29'
annotationProcessor 'org.projectlombok:lombok:1.18.2'
compileOnly 'org.projectlombok:lombok:1.18.2'
}
configurations {
all*.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
all*.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
all*.exclude group: 'log4j', module: 'log4j'
}
sourceSets {
main {
java {
srcDir 'src/main/java'
}
resources {
srcDir 'src/main/resources'
}
}
}
clean {
delete 'dist'
delete 'build'
}
jar {
destinationDir file('dist/apps')
archiveName project.name + '.jar'
exclude '**/*.xml'
exclude '**/*.properties'
doLast {
copy {
from file('src/main/resources/')
into 'dist/conf_template'
}
copy {
from file('files/')
into 'dist/files'
}
copy {
from configurations.runtime
into 'dist/lib'
}
copy {
from file('.').listFiles().findAll{File f -> (f.name.endsWith('.bat') || f.name.endsWith('.sh') || f.name.endsWith('.env'))}
into 'dist'
}
}
}
configurations {
compile.exclude group:'ch.qos.logback'
}
dependencies {
compile ("org.springframework.boot:spring-boot-starter-web") {
exclude module: 'org.springframework.boot:spring-boot-starter-logging'
}
compile ('org.springframework.boot:spring-boot-starter-log4j2')
}