-
Notifications
You must be signed in to change notification settings - Fork 8
/
deploy.gradle
31 lines (26 loc) · 775 Bytes
/
deploy.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
remotes {
ev3dev {
host = '192.168.1.206'
user = 'robot'
password = 'maker'
}
}
task deploy << {
ssh.run {
session(remotes.ev3dev) {
put from: "./build/libs/" + "${rootProject.name}" + "-all-" + version + ".jar", into: "/home/robot/"
}
}
}
deploy.dependsOn clean, fatJar
task remoteRun << {
ssh.run {
session(remotes.ev3dev) {
println "java -Djava.library.path=/usr/lib/jni/ -server -jar /home/robot/" + "${rootProject.name}" + "-all-" + version + ".jar"
execute "java -Djava.library.path=/usr/lib/jni/ -server -jar /home/robot/" + "${rootProject.name}" + "-all-" + version + ".jar"
}
}
}
task deployAndRun << {
}
deployAndRun.dependsOn deploy, remoteRun