-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
executable file
·407 lines (343 loc) · 12.6 KB
/
build.gradle
File metadata and controls
executable file
·407 lines (343 loc) · 12.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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
buildscript {
dependencies {
classpath 'com.gradleup.shadow:shadow-gradle-plugin:8.3.9'
}
}
plugins {
id 'java'
id 'signing'
id 'maven-publish'
id 'java-library'
id 'com.diffplug.spotless' version '6.25.0'
}
spotless {
java {
lineEndings = com.diffplug.spotless.LineEnding.UNIX
// Eclipse formatter with your config file
eclipse('4.26').configFile('config/eclipse-formatter.xml') // Optional but recommended additions:
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
}
}
if (project == rootProject) {
apply plugin: 'com.gradleup.shadow'
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
resources {
srcDirs = ['src/main/resources']
}
output.classesDirs = files("$buildDir/classes/java/main")
output.resourcesDir = file("$buildDir/resources/main")
}
test {
java {
srcDirs = ['test/java/src/']
}
resources {
srcDirs = ['test/resources']
}
output.classesDirs = files("$buildDir/classes/java/test")
output.resourcesDir = file("$buildDir/resources/test")
// Test compile classpath includes main output
compileClasspath += main.output
// Test runtime classpath includes main output
runtimeClasspath += main.output
}
}
//java {
// toolchain {
// languageVersion = JavaLanguageVersion.of(17)
// }
//}
def props = new Properties()
file('src/main/resources/com/neuronrobotics/bowlerkernel/build.properties')
.withInputStream { props.load(it) }
boolean is64Bit() {
////System.out.println("Arch: "+getOsArch());
return getOsArch().startsWith("x86_64") || getOsArch().startsWith("amd64");
}
boolean isARM() {
return getOsArch().startsWith("arm");
}
boolean isCortexA8(){
if(isARM()){
//TODO check for cortex a8 vs arm9 generic
return true;
}
return false;
}
boolean isWindows() {
////System.out.println("OS name: "+getOsName());
return getOsName().toLowerCase().startsWith("windows") ||getOsName().toLowerCase().startsWith("microsoft") || getOsName().toLowerCase().startsWith("ms");
}
boolean isLinux() {
return getOsName().toLowerCase().startsWith("linux");
}
boolean isOSX() {
return getOsName().toLowerCase().startsWith("mac");
}
String getExtension() {
if(isWindows()) {
return ".dll";
}
if(isLinux()) {
return ".so";
}
if(isOSX()) {
return ".jnilib";
}
return "";
}
String getOsName() {
return System.getProperty("os.name");
}
String getOsArch() {
return System.getProperty("os.arch");
}
repositories {
mavenCentral()
maven {
url 'https://commonwealthrobotics.com/maven/'
allowInsecureProtocol = true
}
maven { url 'https://repo.maven.apache.org/maven2/' }
maven { url 'https://repo1.maven.org/maven2/'}
// maven {
// url "https://repo.myrobotlab.org/artifactory/myrobotlab/"
// content {
// includeGroup("de.dfki.mary")
// }
// }
maven { url 'https://maven-central.storage-download.googleapis.com/repos/central/data/'}
maven {url 'https://repo.jenkins-ci.org/public/'}
maven {
url "https://repo.jenkins-ci.org/releases/"
}
maven { url "https://jitpack.io" }
maven { url "https://repo.eclipse.org/content/groups/releases/" }
maven { url "https://dl.bintray.com/dfki-lt/maven/" }
maven { url "https://raw.github.com/marytts/marytts/master/repository/" }
maven { url "https://repo.jenkins-ci.org/public/" }
maven { url "https://clojars.org/repo" }
}
dependencies {
//api 'com.neuronrobotics:JavaCad:2.9.5'
api project('JCSG')
api project('java-bowler')
api project('GithubPasswordManager:GithubPasswordManager')
//compile group: "de.swirtz", name: "ktsRunner", version: "0.0.7"
api 'us.ihmc:jinput:2.0.6-ihmc2'
api group: 'us.ihmc', name: 'ihmc-native-library-loader', version: '1.3.1'
api 'com.google.crypto.tink:tink:1.3.0-rc1'
api group: 'org.json', name: 'json', version: '20180813'
api 'gov.nist.math:jama:1.0.2'
api group: 'org.fxmisc.richtext', name: 'richtextfx', version: '0.6'
api group: 'org.reactfx', name: 'reactfx', version: '2.0-SNAPSHOT'
api group: 'org.apache.groovy', name: 'groovy', version: '4.0.22'
api group: 'org.apache.ivy', name: 'ivy', version: '2.5.2'
//compile group: 'org.controlsfx', name: 'controlsfx', version: '8.0.6'
api group: 'commons-lang', name: 'commons-lang', version: '2.6'
api group: 'commons-codec', name: 'commons-codec', version: '1.7'
// https://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit
api group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: '5.13.1.202206130422-r'
// https://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit.ssh.apache
api group: 'org.eclipse.jgit', name: 'org.eclipse.jgit.ssh.apache', version: '5.13.1.202206130422-r'
// https://mvnrepository.com/artifact/org.apache.httpcomponents.client5/httpclient5
api group: 'org.apache.httpcomponents.client5', name: 'httpclient5', version: '5.2.1'
api group: 'com.squareup.okhttp', name: 'okhttp-urlconnection', version: '2.0.0'
api group: 'org.mockito', name: 'mockito-all', version: '1.9.5'
api group: 'com.infradna.tool', name: 'bridge-method-injector', version: '1.14'
api 'com.miglayout:miglayout-swing:4.2'
api 'commons-io:commons-io:2.6'
api group:'org.python',name:'jython',version:'2.5.3'
api group:'org.python',name:'jython-standalone',version:'2.5.2'
api 'org.clojure:clojure:1.8.0'
// jetty server
api "org.eclipse.jetty:jetty-server:9.0.2.v20130417"
api "org.eclipse.jetty:jetty-servlet:9.0.2.v20130417"
api "org.eclipse.jetty:jetty-servlets:9.0.2.v20130417"
api "org.eclipse.jetty:jetty-webapp:9.0.2.v20130417"
api "javax.servlet:javax.servlet-api:3.1.0"
api group: 'java3d', name: 'vecmath', version: '1.3.1'
api 'org.slf4j:slf4j-simple:1.6.1'
api group:'de.huxhorn.sulky', name:'de.huxhorn.sulky.3rdparty.jlayer', version:'1.0'
api 'com.google.code.gson:gson:2.5'
api 'org.jsoup:jsoup:1.8.3'
api 'org.apache.httpcomponents:httpclient:4.5.1'
api 'com.github.kurbatov:firmata4j:2.3.4.1'
testImplementation 'junit:junit:4.10'
api group: 'com.github.stephengold', name: 'jbullet', version: '1.0.3'
// implementation('de.dfki.mary:voice-cmu-slt-hsmm:5.2.1') {
// exclude group: 'commons-io', module: 'commons-io'
// exclude group: 'com.twmacinta', module: 'fast-md5'
// exclude group: 'gov.nist.math', module: 'Jampack'
// }
implementation('de.dfki.mary:voice-dfki-poppy-hsmm:5.2') {
exclude group: 'commons-io', module: 'commons-io'
exclude group: 'com.twmacinta', module: 'fast-md5'
exclude group: 'gov.nist.math', module: 'Jampack'
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
}
implementation('de.dfki.mary:voice-dfki-prudence-hsmm:5.2') {
exclude group: 'commons-io', module: 'commons-io'
exclude group: 'com.twmacinta', module: 'fast-md5'
exclude group: 'gov.nist.math', module: 'Jampack'
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
}
implementation('de.dfki.mary:voice-dfki-spike-hsmm:5.2') {
exclude group: 'commons-io', module: 'commons-io'
exclude group: 'com.twmacinta', module: 'fast-md5'
exclude group: 'gov.nist.math', module: 'Jampack'
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
}
implementation('de.dfki.mary:voice-cmu-rms-hsmm:5.2') {
exclude group: 'commons-io', module: 'commons-io'
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
exclude group: 'com.twmacinta', module: 'fast-md5'
exclude group: 'gov.nist.math', module: 'Jampack'
}
implementation('de.dfki.mary:voice-dfki-obadiah-hsmm:5.2') {
exclude group: 'commons-io', module: 'commons-io'
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
exclude group: 'com.twmacinta', module: 'fast-md5'
exclude group: 'gov.nist.math', module: 'Jampack'
}
implementation('de.dfki.mary:voice-cmu-rms-hsmm:5.2') {
exclude group: 'commons-io', module: 'commons-io'
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
exclude group: 'com.twmacinta', module: 'fast-md5'
exclude group: 'gov.nist.math', module: 'Jampack'
}
implementation('de.dfki.mary:voice-cmu-bdl-hsmm:5.2') {
exclude group: 'commons-io', module: 'commons-io'
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
exclude group: 'com.twmacinta', module: 'fast-md5'
exclude group: 'gov.nist.math', module: 'Jampack'
}
implementation('de.dfki.mary:marytts-lang-en:5.2.1') {
exclude group: 'commons-io', module: 'commons-io'
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
exclude group: 'com.twmacinta', module: 'fast-md5'
exclude group: 'gov.nist.math', module: 'Jampack'
}
implementation 'ai.djl:api:'
implementation 'ai.djl.pytorch:pytorch-engine:0.22.1'
implementation 'ai.djl.pytorch:pytorch-jni:2.0.0-0.22.1'
implementation("ai.djl.onnxruntime:onnxruntime-engine:0.22.1")
// https://mvnrepository.com/artifact/com.github.docker-java/docker-java
implementation group: 'com.github.docker-java', name: 'docker-java', version: '3.3.0'
implementation group: 'com.github.docker-java', name: 'docker-java-transport-okhttp', version: '3.3.0'
// https://mvnrepository.com/artifact/com.github.docker-java/docker-java-transport-httpclient5
implementation group: 'com.github.docker-java', name: 'docker-java-transport-httpclient5', version: '3.3.0'
//MuJoCo
implementation group: 'org.bytedeco', name: 'javacpp', version: '1.5.7'
implementation group: 'com.neuronrobotics', name: 'mujoco-java', version:'3.1.3-pre.17'
//Java17 update
// JAXB API
implementation 'javax.xml.bind:jaxb-api:2.3.1'
// JAXB Implementation
implementation 'com.sun.xml.bind:jaxb-impl:2.3.1'
// JAXB Core
implementation 'com.sun.xml.bind:jaxb-core:2.3.0.1'
// Java Activation needed by JAXB
implementation 'javax.activation:javax.activation-api:1.2.0'
// https://mvnrepository.com/artifact/org.robokind/org.robokind.api.speech
implementation group: 'org.robokind', name: 'org.robokind.api.speech', version: '0.9.5'
// https://mvnrepository.com/artifact/net.lingala.zip4j/zip4j
implementation group: 'net.lingala.zip4j', name: 'zip4j', version: '2.11.5'
// https://mvnrepository.com/artifact/com.alphacephei/vosk
implementation( 'com.alphacephei:vosk:0.3.38') {
exclude group: 'net.java.dev.jna', module: 'jna'
}
// Add OpenCV
implementation 'org.openpnp:opencv:4.7.0-0'
// https://mvnrepository.com/artifact/com.neuronrobotics/SimplePacketComsJava
implementation group: 'com.neuronrobotics', name: 'SimplePacketComsJava', version: '1.0.0'
// Zip and unzip, tar and untar
implementation 'org.apache.commons:commons-compress:1.26.2'
// Addiing advance system execution for advanced editors
implementation 'org.apache.commons:commons-exec:1.3'
implementation 'org.tukaani:xz:1.9'
implementation 'org.brotli:dec:0.1.2' // Add this for Brotli support
// Add 7z native bindings
implementation 'net.sf.sevenzipjbinding:sevenzipjbinding:16.02-2.01'
implementation 'net.sf.sevenzipjbinding:sevenzipjbinding-all-platforms:16.02-2.01'
// inkscape loading
implementation group: 'org.apache.xmlgraphics', name: 'batik-all', version: '1.17'
}
// create a fat-jar (class files plus dependencies
// excludes VRL.jar (plugin jar files must not start with 'vrl-\\d+')
jar {
jar.duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes(
"Main-Class": 'com.neuronrobotics.bowlerstudio.BowlerKernel',
"Manifest-Version": "1.0",
"Created-By": "CommonWealth Cooperative",
"Specification-Title": props."app.name",
"Specification-Version": props."app.version",
"Specification-Vendor": "CommonWealth Robotics Cooperative",
"Implementation-Title": props."app.name",
"Implementation-Version" : props."app.version",
"Implementation-Vendor": "CommonWealth Robotics Cooperative"
)
}
}
if (project == rootProject) {
shadowJar {
dependsOn 'spotlessApply'
zip64 true
//mainClassName = 'com.neuronrobotics.bowlerstudio.BowlerKernel'
if (project == rootProject) {
archiveBaseName = 'bowler-kernel'
archiveClassifier = ""
}else {
archiveBaseName.set('bowler-kernel')
archiveClassifier.set('')
archiveVersion.set('')
}
mergeServiceFiles()
}
}
group = "com.neuronrobotics"
base {
archivesName = "bowler-script-kernel"
}
task javadocJar(type: Jar) {
if (project == rootProject)
archiveClassifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
if (project == rootProject)
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar, jar
}
//test {
// testLogging.showExceptions = true
// testLogging.showCauses = true
//}
test {
testLogging {
// Show which test is running
events "passed", "skipped", "failed", "standardOut", "standardError"
// Show standard out and error
showStandardStreams = true
// Optional: show more details
exceptionFormat = "full"
showExceptions = true
showCauses = true
showStackTraces = true
}
}