-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
68 lines (57 loc) · 1.72 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
import java.util.zip.ZipFile
import org.apache.commons.io.IOUtils
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'commons-io:commons-io:2.4'
}
}
apply plugin: 'groovy'
version = '1.0'
def exotLibs = 'lib'
repositories {
mavenCentral()
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.3.9'
compile 'cz.geek:gooddata-java:0.10.0'
compile 'org.apache.commons:commons-csv:1.1'
runtime 'org.python:jython:2.5.3'
compile fileTree(dir: exotLibs, include: '*.jar')
testCompile group: 'junit', name: 'junit', version: '4.11'
}
task smokeHealthGD(type: JavaExec, dependsOn: compileGroovy) {
classpath = sourceSets.main.runtimeClasspath
main = 'SmokeHealthGd'
args = project.properties.with {
return [splunkUser, splunkPass, gdUser, gdPass, gdProject, ads]
}
}
task downloadExots {
println 'downloading exotic libs:'
['https://developer.gooddata.com/downloads/dss/ads-driver.zip',
'http://download.splunk.com/misc/sdk/java/splunk-sdk-java-1.3.1.jar']
.each {
def library = exotLibs + '/' + it.tokenize("/")[-1]
def file = new FileOutputStream(library)
print "... $library"
def out = new BufferedOutputStream(file)
out << new URL(it).openStream()
out.close()
println ' ... DONE'
}
print 'Unzipping ADS driver ... '
def adsDriver = new File("$exotLibs/ads-driver.zip")
def zip = new ZipFile(adsDriver)
zip.entries().each {
IOUtils.copy(zip.getInputStream(it), new FileOutputStream("$exotLibs/${it.name}"))
}
zip.close()
adsDriver.delete()
println 'DONE'
}
task wrapper(type: Wrapper) {
gradleVersion = '2.2.1'
}