-
Notifications
You must be signed in to change notification settings - Fork 6
/
common.gradle
40 lines (33 loc) · 1.33 KB
/
common.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
ext.getVersion = {
def infoXML = new XmlSlurper().parse("$rootDir/com.ibm.streamsx.messagehub/info.xml").declareNamespace('info':'http://www.ibm.com/xmlns/prod/streams/spl/toolkitInfo')
return infoXML.identity.version.text()
}
ext.splMakeToolkit = {
exec() {
environment 'CLASSPATH', 'com.ibm.streamsx.messagehub/lib/*'
commandLine System.getenv("STREAMS_INSTALL") + '/bin/spl-make-toolkit', '-i', '.'
}
}
ext.splCleanToolkit = {
exec() {
commandLine System.getenv("STREAMS_INSTALL") + '/bin/spl-make-toolkit', '-i', '.', '-c'
}
}
ext.compileApp = { namespace, mainComp, toolkitPath ->
exec() {
commandLine System.getenv("STREAMS_INSTALL") + '/bin/sc', '-M', namespace + '::' + mainComp, '--output-directory=output/' + namespace + '.' + mainComp, '-a', '-t', toolkitPath
}
}
ext.cleanApp = { namespace, mainComp ->
exec() {
commandLine System.getenv("STREAMS_INSTALL") + '/bin/sc', '-C', '-M', namespace + "::" + mainComp
}
exec() {
commandLine 'rm', '-rf', 'output/' + namespace + '.' + mainComp
}
}
ext.spldoc = { toolkit, title ->
exec() {
commandLine System.getenv("STREAMS_INSTALL") + '/bin/spl-make-doc', '--warn-no-comments', '--copy-image-files', '-i', toolkit, '--output-dir', 'docs/spldoc', '--doc-title', title
}
}