-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
89 lines (73 loc) · 2.78 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
plugins {
id("us.ihmc.ihmc-build")
id("us.ihmc.log-tools-plugin") version "0.6.5"
id("org.hidetake.ssh") version "2.1.1"
}
import org.gradle.api.GradleException
ihmc {
//loadProductProperties("../product.properties")
configureDependencyResolution()
configurePublications()
}
mainDependencies {
api("us.ihmc:euclid-frame:0.22.3")
api("us.ihmc:euclid-shape:0.22.3")
api("org.ejml:ejml-ddense:0.39")
api("org.ejml:ejml-core:0.39")
api("net.sf.trove4j:trove4j:3.0.3")
api("com.thoughtworks.xstream:xstream:1.4.19")
api("us.ihmc:ihmc-communication:source")
api("us.ihmc:ihmc-common-walking-control-modules:source")
api("us.ihmc:ihmc-robot-models:source")
api("us.ihmc:ihmc-sensor-processing:source")
api("us.ihmc:ihmc-humanoid-robotics:source")
api("us.ihmc:ihmc-avatar-interfaces:source")
api("us.ihmc:ihmc-state-estimation:source")
api("us.ihmc:atlas:source")
api("us.ihmc:ihmc-java-toolkit:source")
api("us.ihmc:ihmc-robotics-toolkit:source")
api("us.ihmc:ihmc-simulation-toolkit:source")
}
oldgdxDependencies {
api(ihmc.sourceSetProject("main"))
api("com.badlogicgames.gdx:gdx-bullet-platform:1.9.4:natives-desktop")
api("com.badlogicgames.gdx:gdx-bullet:1.9.4")
}
if (ihmc.isBuildRoot())
{
remotes {
testbed {
host = '10.7.4.50'
// Set the username and password in ~/.gradle/gradle.properties.
user = project.hasProperty('testbed_username') ? "${testbed_username}" : "invalid"
password = project.hasProperty('testbed_password') ? "${testbed_password}" : "invalid"
knownHosts = allowAnyHosts
}
}
task deploy(dependsOn: ['jar']) {
ihmc.jarWithLibFolder()
def projectDir = project.buildscript.sourceFile.parent
def directory = 'testbed'
doLast {
if (!project.hasProperty('testbed_username') || !project.hasProperty('testbed_password'))
{
throw new GradleException("Please set testbed_username and testbed_password in ~/.gradle/gradle.properties. See https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_properties_and_system_properties for more information.")
}
ssh.run {
session(remotes.testbed) {
execute("mkdir -p " + directory + "/lib")
configurations.runtime.each {
put it, directory + '/lib'
}
put jar.archivePath, directory + '/testbed.jar'
def scriptDir = new File(projectDir, "launchScripts")
def scriptDirCollection = files { scriptDir.listFiles() }
put scriptDirCollection, directory
scriptDirCollection.each {
execute 'chmod 777 ' + directory + '/' + it.name
}
}
}
}
}
}