-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
72 lines (64 loc) · 2.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
/*
* Copyright (C) 16 Intelligent Information Systems Group.
*
* This file is part of AgE.
*
* AgE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* AgE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with AgE. If not, see <http://www.gnu.org/licenses/>.
*/
plugins {
id 'application'
id 'com.github.johnrengelman.shadow' version '1.2.3'
}
mainClassName = 'pl.edu.agh.age.node.NodeBootstrapper'
applicationDefaultJvmArgs = [
'-enableassertions'
]
dependencies {
compile project(':age3-core')
compile project(':age3-stream-agents')
compile 'org.dom4j:dom4j:2.0.0'
compile 'uk.com.robust-it:cloning:1.9.3'
}
shadowJar {
// Required for merging spring handler definitions (e.g. from Hazelcast)
mergeServiceFiles('META-INF/spring.*')
}
// Use ProcessBuilder to have a correct tty on Linux
task(shell, dependsOn: 'classes') << {
def classpath = sourceSets.main.runtimeClasspath
def command = [
'java',
'-cp', classpath.collect().join(java.io.File.pathSeparator),
'pl.edu.agh.age.console.ConsoleBootstrapper'
]
if (project.hasProperty('appArgs')) {
command.addAll(Eval.me(appArgs))
}
def proc = new ProcessBuilder(command)
.redirectOutput(ProcessBuilder.Redirect.INHERIT)
.redirectInput(ProcessBuilder.Redirect.INHERIT)
.redirectError(ProcessBuilder.Redirect.INHERIT)
.start()
proc.waitFor()
}
task node(type: JavaExec) {
main = 'pl.edu.agh.age.node.NodeBootstrapper'
classpath = sourceSets.main.runtimeClasspath
standardOutput = System.out
standardInput = System.in
jvmArgs '-enableassertions'
if (project.hasProperty('appArgs')) {
args Eval.me(appArgs)
}
}