-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathbuild.gradle
More file actions
42 lines (39 loc) · 1.6 KB
/
build.gradle
File metadata and controls
42 lines (39 loc) · 1.6 KB
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
apply plugin: 'java'
apply plugin: 'eclipse'
subprojects {
apply plugin: 'java'
}
allprojects {
task hello << { task -> println "I'm $task.project.name" }
}
task runDefaultTasks {
subprojects.each { subproject ->subproject.defaultTasks.each {
dependsOn subproject.path+":"+it
}
}
}
task clusterconnect(type:Exec){
if ( project.hasProperty("ip") && project.hasProperty("port") && project.hasProperty("clientKey") && project.hasProperty("clientCert")) {
commandLine '/bin/bash','Scripts/connect.sh', '-ip', Eval.me(ip), '-port', Eval.me(port), '-clientKey', Eval.me(clientKey), '-clientCert', Eval.me(clientCert)
} else if (project.hasProperty("ip") && project.hasProperty("port")) {
commandLine '/bin/bash','Scripts/connect.sh', '-ip', Eval.me(ip), '-port', Eval.me(port)
} else {
commandLine '/bin/bash', 'Scripts/connect.sh'
}
}
task launch(type:Exec) {
def applicationTypeVersion ="1.0.0";
if ( project.hasProperty("ApplicationTypeVersion"))
applicationTypeVersion = Eval.me(ApplicationTypeVersion);
if (project.hasProperty("config") && Eval.me(config)=='deploy' ) {
commandLine '/bin/bash','Scripts/deploy.sh', applicationTypeVersion
}
else if ( project.hasProperty("config") && Eval.me(config)=='undeploy' ) {
commandLine '/bin/bash','Scripts/uninstall.sh', applicationTypeVersion
}
else if (project.hasProperty("config") && Eval.me(config)=='upgrade'){
commandLine '/bin/bash','Scripts/upgrade.sh', applicationTypeVersion
}
}
task copyDeps() << {}
defaultTasks 'clean', 'jar', 'copyDeps'