-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathbuild.gradle
112 lines (97 loc) · 3.1 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
apply plugin: 'maven'
apply plugin: 'java'
apply plugin: 'eclipse'
//指定JDK版本,改成系统中版本
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()
}
List fastjson = [
"com.alibaba:fastjson:1.2.29"
]
List httpclient = [
"org.apache.httpcomponents:httpclient:4.5.2"
]
List logger = [
"org.slf4j:jul-to-slf4j:1.7.10",
"org.apache.logging.log4j:log4j-api:2.1",
"org.apache.logging.log4j:log4j-core:2.1",
"org.apache.logging.log4j:log4j-slf4j-impl:2.1",
"org.apache.logging.log4j:log4j-web:2.1"
]
def spring_version="4.1.8.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-test:$spring_version"
]
// In this section you declare the dependencies for your production and test code
dependencies {
compile logger,spring,fastjson,httpclient
runtime logger,spring,fastjson,httpclient
compile "com.fasterxml.jackson.core:jackson-databind:2.8.11"
runtime "com.fasterxml.jackson.core:jackson-databind:2.8.11"
compile 'io.netty:netty-all:4.1.15.Final'
runtime 'io.netty:netty-all:4.1.15.Final'
compile 'io.netty:netty-tcnative:2.0.0.Final'
runtime 'io.netty:netty-tcnative:2.0.0.Final'
compile 'com.google.guava:guava:19.0'
runtime 'com.google.guava:guava:19.0'
// web3j依赖
compile 'org.apache.httpcomponents:httpclient:4.5.2',
'org.bouncycastle:bcprov-jdk15on:1.54',
'com.lambdaworks:scrypt:1.4.0',
'com.squareup:javapoet:1.7.0',
'io.reactivex:rxjava:1.2.4',
'com.github.jnr:jnr-unixsocket:0.15'
compile files('lib/web3sdk.jar')
compile 'org.projectlombok:lombok:1.16.20'
annotationProcessor 'org.projectlombok:lombok:1.16.20'
compile 'javax.servlet:servlet-api:2.5'
compile 'org.eclipse.jetty.aggregate:jetty-all:9.4.31.v20200723'
runtime 'org.eclipse.jetty.aggregate:jetty-all:9.4.31.v20200723'
runtime files('lib/web3sdk.jar')
runtime 'org.projectlombok:lombok:1.16.20'
runtime 'javax.servlet:servlet-api:2.5'
//testCompile 'junit:junit:4.12'
}
sourceSets {
main {
java {
srcDir 'src/main/java'
}
resources {
srcDir 'src/main/resources'
}
}
}
jar {
destinationDir file('dist/apps')
archiveName project.name + '.jar'
exclude '**/*.xml'
exclude '**/*.properties'
doLast {
copy {
from file('src/main/resources/')
into 'dist/conf'
}
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'
}
}
}