forked from FISCO-BCOS/web3sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
203 lines (182 loc) · 4.83 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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'signing'
apply plugin:'application'
apply plugin: 'jacoco'
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/"
}
maven { url 'https://dl.bintray.com/ethereum/maven/' }
mavenCentral()
}
def spring_version="4.3.18.RELEASE"
List logger = [
'org.slf4j:slf4j-log4j12:1.7.25'
// 'org.slf4j:slf4j-api:1.7.25'
]
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"
]
List alibaba = [
'com.alibaba:druid:1.0.29',
'com.alibaba:fastjson:1.2.29'
]
// In this section you declare the dependencies for your production and test code
dependencies {
// compile files('lib/solcJ-all-0.4.25-gm.jar')
//compile 'org.ethereum:solcJ-all:0.5.2'
compile 'org.ethereum:solcJ-all:0.4.25'
compile logger,spring,alibaba
compile 'org.apache.commons:commons-lang3:3.1'
compile "com.fasterxml.jackson.core:jackson-databind:2.9.6"
compile 'io.netty:netty-all:4.1.32.Final'
compile 'io.netty:netty-tcnative:2.0.20.Final'
compile 'io.netty:netty-tcnative-boringssl-static:2.0.20.Final'
compile 'com.google.guava:guava:19.0'
compile 'org.jline:jline:3.9.0'
compile 'commons-configuration:commons-configuration:1.10'
// web3j
compile 'org.apache.httpcomponents:httpclient:4.5.5',
'org.bouncycastle:bcprov-jdk15on:1.54',
'com.lambdaworks:scrypt:1.4.0',
'com.squareup:javapoet:1.7.0',
'io.reactivex:rxjava:1.2.4',
"io.reactivex.rxjava2:rxjava:2.2.2",
'com.github.jnr:jnr-unixsocket:0.15',
'info.picocli:picocli:3.6.0',
"org.java-websocket:Java-WebSocket:1.3.8",
"org.apache.commons:commons-collections4:4.0",
"commons-io:commons-io:2.4",
'com.github.stefanbirkner:system-rules:1.18.0',
'io.bretty:console-table-builder:1.2',
'junit:junit:4.12',
'org.mockito:mockito-core:2.23.0'
}
archivesBaseName = 'web3sdk'
group = 'org.fisco-bcos'
version = '2.0.2'
// for old sdk
sourceSets {
main {
java {
srcDir 'src/main/java'
srcDir 'src/test/java'
}
resources {
srcDir 'src/test/resources'
}
}
}
// 1 dist jar
jar {
destinationDir file('dist/apps')
archiveName project.name + '.jar'
exclude '**/*.xml'
exclude '**/*.properties'
exclude '**/*.crt'
exclude '**/*.key'
doLast {
copy {
from file('tools/sol2java.sh')
into 'dist/tools/'
}
copy {
from configurations.runtime
into 'dist/lib'
}
copy {
from file('src/test/resources/')
into 'dist/conf'
}
copy {
from file('src/test/resources/contract/Table.sol')
into 'dist/tools/contracts'
}
}
}
test {
testLogging.showStandardStreams = true
}
// for upload to maven
//task sourcesJar(type: Jar) {
// classifier = 'sources'
// from sourceSets.main.allSource
//}
//
//task javadocJar(type: Jar, dependsOn: javadoc) {
// classifier = 'javadoc'
// from javadoc.destinationDir
//}
//
//artifacts {
// archives jar
// archives sourcesJar
// archives javadocJar
//}
//
//signing {
// required { gradle.taskGraph.hasTask("uploadArchives") }
// sign configurations.archives
//}
//
//uploadArchives {
// repositories {
// mavenDeployer {
// beforeDeployment { deployment -> signing.signPom(deployment) }
//
// repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
// authentication(userName: ossrhUsername, password: ossrhPassword)
// }
//
// snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
// authentication(userName: sonatypeUsername, password: sonatypePassword)
// }
//
// pom.project {
// name 'fisco-bcos'
// packaging 'jar'
// description 'fisco-bcos web3jsdk'
// url 'http://www.fisco-bcos.org'
//
// scm {
// url 'https://github.com/FISCO-BCOS/web3sdk.git'
// connection 'https://github.com/FISCO-BCOS/web3sdk.git'
// }
//
// licenses {
// license {
// name 'The Apache License, Version 2.0'
// url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
// }
// }
// developers {
// developer {
// id 'zhangsan'
// name 'zhangsan'
// email 'zhangsan@gmail.com'
// }
// }
// }
// }
// }
//}
jacocoTestReport {
reports {
xml.enabled true
html.enabled false
}
}
check.dependsOn jacocoTestReport
mainClassName = System.getProperty("exec.mainClass") ?: "org.fisco.bcos.channel.test.amop.Channel2Client"