-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
148 lines (115 loc) · 5.55 KB
/
Copy pathbuild.gradle
File metadata and controls
148 lines (115 loc) · 5.55 KB
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
group 'uchain'
version '1.0-SNAPSHOT'
apply plugin: 'java'
sourceCompatibility = 1.8
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
classpath "com.github.jengelman.gradle.plugins:shadow:2.0.1"
}
}
apply plugin: 'com.github.johnrengelman.shadow'
shadowJar {
baseName = 'uchain'
version = '1.0-SNAPSHOT'
transform(com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer) {
resource = 'reference.conf'
}
}
repositories {
mavenCentral()
maven { url "https://oss.jfrog.org/libs-snapshot/" }
maven { url "https://dl.bintray.com/ethereum/maven/" }
maven { url "https://repo.spring.io/libs-snapshot" }
}
configurations.all {
exclude group: 'ch.qos.logback'
exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl'
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
configurations {
runtime.exclude group: "'ch.qos.logback'"
runtime.exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl'
dependencies {
compile "org.slf4j:slf4j-api:1.8.0-beta1"
compile "org.slf4j:slf4j-log4j12:1.8.0-beta1"
compile "log4j:log4j:1.2.17"
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.59'
compile "org.functionaljava:functionaljava:4.6"
compile "org.functionaljava:functionaljava-java8:4.6"
compile group: 'org.ethereum', name: 'solcJ-all', version: '0.4.25'
compile "javax.servlet:javax.servlet-api:3.1-b07"
compile "com.mashape.unirest:unirest-java:1.3.1"
compile "org.apache.commons:commons-io:1.3.2"
compile group: 'net.sourceforge.argparse4j', name: 'argparse4j', version: '0.8.1'
testCompile "junit:junit"
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.8.5'
compile group: 'commons-net', name: 'commons-net', version: '3.3'
compile group: 'org.projectlombok', name: 'lombok', version: '1.18.2'
compile "org.bitlet:weupnp:0.1.4"
compile "com.typesafe.akka:akka-actor_2.12:2.5.12"
compile "com.typesafe.akka:akka-http-core_2.12:10.1.0"
compile "ch.megard:akka-http-cors_2.12:0.2.2"
compile group: 'de.heikoseeberger', name: 'akka-http-circe_2.12', version: '1.21.0'
compile group: 'org.projectlombok', name: 'lombok', version: '1.18.0'
compile group: 'org.iq80.leveldb', name: 'leveldb', version: '0.10'
compile group: 'org.iq80.leveldb', name: 'leveldb-api', version: '0.10'
compile group: 'org.fusesource.leveldbjni', name: 'leveldbjni-all', version: '1.8'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.9.7'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.7'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.9.7'
compile 'net.sf.json-lib:json-lib:2.4:jdk15'
compile group: 'org.rocksdb', name: 'rocksdbjni', version: '5.5.1'
compile group: 'com.typesafe.play', name: 'play-json_2.12', version: '2.7.0-M1'
compile group: 'org.glassfish.jersey.containers', name: 'jersey-container-servlet', version: '2.20'
compile group: 'org.glassfish.jersey.core', name: 'jersey-server', version: '2.20'
compile group: 'org.glassfish.jersey.containers', name: 'jersey-container-grizzly2-http', version: '2.20'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.3.5'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.3.5'
compile group: 'com.fasterxml.jackson.jaxrs', name: 'jackson-jaxrs-json-provider', version: '2.3.5'
compile "com.madgag.spongycastle:core:1.58.0.0" // for SHA3 and SECP256K1
compile "com.madgag.spongycastle:prov:1.58.0.0" // for SHA3 and SECP256K1
compile "org.apache.commons:commons-collections4:4.0"
compile "commons-codec:commons-codec:1.10"
compile "com.cedarsoftware:java-util:1.8.0" // for deep equals
compile "org.springframework:spring-context:4.3.19.RELEASE"
compile "com.googlecode.concurrent-locks:concurrent-locks:1.0.0"
compile "org.apache.commons:commons-lang3:3.4"
compile group: 'org.mongodb', name: 'mongo-java-driver', version: '3.9.0'
compile 'org.mongodb:mongodb-driver-reactivestreams:1.10.0'
}
}
jar {
StringBuilder sb = new StringBuilder()
configurations.runtime.each {sb = sb.append("lib/"+it.name)}
manifest {
attributes 'Main-Class': 'com.uchain.Main'
attributes 'Class-Path': sb
attributes 'Implementation-Title': 'uchain'
attributes 'Implementation-Version': version
}
}
task runTask(type: JavaExec, dependsOn: classes) {
main = 'Main'
classpath sourceSets.main.runtimeClasspath
classpath configurations.runtime
jvmArgs = ["-Xss8m", "-Xmx3G"]
}
task copy(type: Copy){
from configurations.runtime
into ('build/libs/lib')
}
task release(type: Copy,dependsOn: [build,copy]) {
from 'conf'
into ('build/libs/conf')
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.bootClasspath = "$System.env.JAVA_HOME/jre/lib/rt.jar"
options.bootClasspath += "$File.pathSeparator$System.env.JAVA_HOME/jre/lib/jce.jar"
options.bootClasspath += "$File.pathSeparator$System.env.JAVA_HOME/jre/lib/jsse.jar"
}