-
Notifications
You must be signed in to change notification settings - Fork 25
/
build.gradle
73 lines (59 loc) · 2.01 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
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.ethereum'
version '0.5.7'
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 = 'ethereum'
repo = 'maven'
name = 'org.ethereum.solcJ-all'
licenses = []
vcsUrl = 'https://github.com/ether-camp/solcJ.git'
labels = ['Solidity']
publicDownloadNumbers = true
version {
name = project.version
desc = ''
}
}
}
repositories {
jcenter()
}
dependencies {
testCompile "junit:junit:4.11"
}
test {
testLogging.showStandardStreams = true
afterTest { desc, result ->
println "Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}"
}
}
task downloadStaticLinuxFile(type: Download) {
src "https://github.com/ethereum/solidity/releases/download/v${version}/solc-static-linux"
dest "${projectDir}/src/main/resources/native/linux/solc/solc"
}
task downloadWindowsZipFile(type: Download) {
src "https://github.com/ethereum/solidity/releases/download/v${version}/solidity-windows.zip"
dest new File("${buildDir}/tmp", 'solidity-windows.zip')
}
task unzipFile(dependsOn: downloadWindowsZipFile, type: Copy) {
from zipTree(downloadWindowsZipFile.dest)
into "${projectDir}/src/main/resources/native/win/solc"
}
task cleanUpFiles(dependsOn: unzipFile, type: Delete) {
delete "${projectDir}/src/main/resources/native/win/solc/soltest.exe"
}
assemble.dependsOn downloadStaticLinuxFile
assemble.dependsOn cleanUpFiles