-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
135 lines (112 loc) · 4.16 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
plugins {
id 'java'
id 'maven'
id 'maven-publish'
id 'com.jfrog.bintray' version '1.8.4'
id 'de.undercouch.download' version '3.4.3'
}
group 'org.gsc'
version '0.0.1'
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.properties['bintrayUser']
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.properties['bintrayApiKey']
configurations = ['archives']
dryRun = false //Whether to run this as dry-run, without deploying
publish = true //If version should be auto published after an upload
override = false
pkg {
userOrg = 'gsc'
repo = 'maven'
name = 'org.gsc.gsc-solcJ'
licenses = []
vcsUrl = 'https://github.com/ether-camp/solcJ.git'
labels = ['Solidity']
publicDownloadNumbers = true
version {
name = project.version
desc = ''
}
}
}
repositories {
jcenter()
}
dependencies {
// google grpc
compile group: 'io.grpc', name: 'grpc-netty', version: '1.9.0'
compile group: 'io.grpc', name: 'grpc-protobuf', version: '1.9.0'
compile group: 'io.grpc', name: 'grpc-stub', version: '1.9.0'
compile "com.madgag.spongycastle:core:1.58.0.0"
compile "com.madgag.spongycastle:prov:1.58.0.0"
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.25'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
compile "org.projectlombok:lombok:1.16.18"
compile group: 'org.fusesource.jansi', name: 'jansi', version: '1.16'
compile group: 'com.alibaba', name: 'fastjson', version: '1.2.44'
compile "com.fasterxml.jackson.core:jackson-databind:2.5.1"
compile "org.apache.commons:commons-collections4:4.0"
compile "org.apache.commons:commons-lang3:3.4"
compile "commons-codec:commons-codec:1.10"
compile "org.springframework:spring-context:4.3.19.RELEASE"
compile("com.googlecode.json-simple:json-simple:1.1.1") {
exclude group: 'junit', module: 'junit'
}
compile "com.typesafe:config:1.2.1"
testCompile "junit:junit:4.11"
}
test {
testLogging.showStandardStreams = true
afterTest { desc, result ->
println "Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}"
}
}
/**
* Create download tasks
*/
ext.solidityVersion = [
'0.4.25',
'0.4.24',
'0.4.23',
]
task downloadStaticLinuxFile{
solidityVersion.each {
solc ->
task "downloadStaticLinuxFile_${solc.hashCode()}"(type: Download) {
src "https://github.com/ethereum/solidity/releases/download/v${solc}/solc-static-linux"
dest "${projectDir}/src/main/resources/native/linux/v${solc}/solc"
}
downloadStaticLinuxFile.dependsOn("downloadStaticLinuxFile_${solc.hashCode()}")
}
}
task downloadWindowsZipFile{
solidityVersion.each {
solc ->
task "downloadWindowsZipFile_${solc.hashCode()}"(type: Download) {
src "https://github.com/ethereum/solidity/releases/download/v${solc}/solidity-windows.zip"
dest new File("${buildDir}/tmp/v${solc}", 'solidity-windows.zip')
}
downloadWindowsZipFile.dependsOn("downloadWindowsZipFile_${solc.hashCode()}")
}
}
task unzipFile{
solidityVersion.each {
solc ->
task "unzipFile_${solc.hashCode()}"(dependsOn: downloadWindowsZipFile, type: Copy) {
from zipTree("${buildDir}/tmp/v${solc}/solidity-windows.zip")
into "${projectDir}/src/main/resources/native/win/v${solc}"
}
unzipFile.dependsOn("unzipFile_${solc.hashCode()}")
}
}
task cleanUpFiles{
solidityVersion.each {
solc ->
task "cleanUpFiles_${solc.hashCode()}"(dependsOn: unzipFile, type: Delete) {
delete "${projectDir}/src/main/resources/native/win/v${solc}/soltest.exe"
}
cleanUpFiles.dependsOn("cleanUpFiles_${solc.hashCode()}")
}
}
assemble.dependsOn downloadStaticLinuxFile
assemble.dependsOn cleanUpFiles