-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
executable file
·521 lines (437 loc) · 16.4 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
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
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
buildscript {
ext {
springBootVersion = '1.2.7.RELEASE'
}
repositories {
[
maven {
url "https://repo1.maven.org/maven2/"
},
//jcenter(),
mavenCentral(),
maven {
url "https://plugins.gradle.org/m2/"
},
mavenLocal()
]
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:5.1.0'
}
// dependencies {
// classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
// classpath('io.spring.gradle:dependency-management-plugin:0.5.2.RELEASE')
// }commons-io
}
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'
apply plugin: 'signing'
if (project == rootProject) {
apply plugin: 'maven'
}
apply plugin: 'java-library'
//apply plugin: 'spring-boot'
//apply plugin: 'io.spring.dependency-management'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceSets {
test {
java {
srcDirs = [
"test/java/src" ] // Note @Peter's comment below
}
}
}
// NetBeans will automatically add "run" and "debug" tasks relying on the
// "mainClass" property. You may however define the property prior executing
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument.
//
// Note however, that you may define your own "run" and "debug" task if you
// prefer. In this case NetBeans will not add these tasks but you may rely on
// your own implementation.
File buildDir = file(".");
Properties props = new Properties()
props.load(new FileInputStream(buildDir.getAbsolutePath()+"/src/main/resources/com/neuronrobotics/bowlerkernel/build.properties"))
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");
}
//https://oss.sonatype.org/service/local/repositories/releases/content/com/neuronrobotics/nrjavaserial/3.10.1/nrjavaserial-3.10.1.jar
repositories {
mavenCentral()
maven {
url 'https://mlt.jfrog.io/artifactory/mlt-mvn-releases-local/'
}
maven { url 'https://repo.maven.apache.org/maven2/' }
maven { url 'https://repo1.maven.org/maven2/'}
//https://jcenter.bintray.com<
maven { url 'https://jcenter.bintray.com/'}
//jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
//maven { url 'https://oss.sonatype.org/service/local/staging/deploy/maven2/' }
maven { url 'https://oss.sonatype.org/content/repositories/releases/' }
//com.neuronrobotics hosting point
maven { url 'https://oss.sonatype.org/content/repositories/staging/' }
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://dl.bintray.com/ihmcrobotics/maven-release/"
// content {
// includeGroup("us.ihmc")
// }
// }
// maven {
// url "https://dl.bintray.com/ihmcrobotics/maven-vendor/"
// content {
// includeGroup("us.ihmc.thirdparty.jinput")
// }
// }
}
dependencies {
//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'
//implementation 'net.java.jinput:jinput:2.0.10' // pegged to Java 17, no MacOS m1 support until java updated
//implementation 'net.java.jinput:jinput:2.0.10:natives-all'
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'
// https://mvnrepository.com/artifact/org.apache.groovy/groovy
api group: 'org.apache.groovy', name: 'groovy', version: '4.0.22'
//make grapes work
api group: 'org.apache.ivy', name: 'ivy', version: '2.5.1'
//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
implementation 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
implementation 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"
//compile 'org.clojure:tools.nrepl:0.2.10'
//compile "overtone:overtone:0.9.1"
//compile "edu.cmu.sphinx:sphinx4-core:5prealpha-SNAPSHOT"
//compile "edu.cmu.sphinx:sphinx4-data:5prealpha-SNAPSHOT"
api group: 'java3d', name: 'vecmath', version: '1.3.1'
api 'org.slf4j:slf4j-simple:1.6.1'
//compile group: 'com.neuronrobotics', name:'GithubPasswordManager', version:'0.6.1'
//compile "com.neuronrobotics:JavaCad:0.14.0"
//compile project('JCSG')
api 'com.neuronrobotics:JavaCad:1.1.1'
//compile "com.neuronrobotics:CHDK-PTP-Java:0.5.3-SNAPSHOT"
//compile "com.neuronrobotics:java-bowler:3.25.4"
api project('java-bowler')
api project('GithubPasswordManager:GithubPasswordManager')
//compile fileTree (dir: ':java-bowler/libs/', includes: ['*.jar'])
//compile fileTree (dir: '../java-bowler/build/libs/', includes: ['nrsdk-3.23.3-jar-with-dependencies.jar'])
//compile fileTree (dir: '../JCSG/build/libs/', includes: ['JavaCad-0.8.2.jar'])
//compile "com.neuronroboticsp:WalnutiQ:2.3.3"
/*
String basedir =System.getenv("OPENCV_DIR")+"/java/opencv-249.jar";
if(isWindows()){
basedir =System.getenv("OPENCV_DIR")+"\\..\\..\\java\\opencv-249.jar";
println("OPENCV_DIR="+basedir);
compile files(basedir)
}
if(isOSX()){
basedir =System.getenv("OPENCV_DIR")+"../../java/opencv-249.jar";
println("OPENCV_DIR="+basedir);
if(System.getenv("OPENCV_DIR")!=null)
compile files(basedir)
else
//If you set your OPENCV_DIR environment variable, then we wouldnt have to do hacky things
compile files('/Applications/BowlerStudio.app/Contents/MacOS/opencv249build/bin/opencv-249.jar')
}
if(isLinux()){
//compile files('/usr/share/java/opencv-249.jar')
if(new File("/usr/share/OpenCV/java/").exists()){
System.out.println("Using the legacy opencv dir ")
compile fileTree (dir: '/usr/share/OpenCV/java/', includes: ['*opencv-24*.jar'])
}else{
compile fileTree (dir: '/usr/share/java/', includes: ['*opencv-24*.jar'])
}
}
*/
//compile group: 'jfree', name: 'jfreechart', version: '1.0.12'
//compile group: 'jexcelapi', name: 'jxl', version: '2.4.2'
//compile group: 'com.google.zxing', name: 'zxing-parent', version: '3.2.0'
//compile group:'com.github.ellzord', name:'JALSE', version:'1.0.9'
api group:'de.huxhorn.sulky', name:'de.huxhorn.sulky.3rdparty.jlayer', version:'1.0'
//compile("org.springframework.boot:spring-boot-starter-web:1.2.7.RELEASE")
api 'com.google.code.gson:gson:2.5'
api 'org.jsoup:jsoup:1.8.3'
api 'org.apache.httpcomponents:httpclient:4.5.1'
//compile 'cz.advel.jbullet:jbullet:20101010-1'
//compile 'org.bubblecloud.jbullet:jbullet:2.72.2.4'// jars local because mave repo for this went down
//compile "alda:alda:1.0.0-rc14"
//Deep Learning 4 j and dependancies
/*
compile 'org.deeplearning4j:deeplearning4j-core:0.4-rc3.8'
//compile 'org.nd4j:nd4j-x86:0.4-rc3.8'
compile 'org.deeplearning4j:deeplearning4j-nlp:0.4-rc3.8'
compile 'org.deeplearning4j:deeplearning4j-ui:0.4-rc3.8'
//compile 'com.google.guava:guava:19.0'
compile 'org.nd4j:canova-nd4j-image:0.0.0.14'
compile 'org.nd4j:canova-nd4j-codec:0.0.0.14'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.5.1'
*/
// JScience:
//compile 'org.jscience:jscience:4.3.1'
//compile 'javax.media:jmf:2.1.1e'
//Weka
//compile 'nz.ac.waikato.cms.weka:weka-stable:3.6.13'
//Firmata
api 'com.github.kurbatov:firmata4j:2.3.4.1'
testImplementation 'junit:junit:4.10'
//api fileTree (dir: 'libs', includes: ['*.jar'])
// https://mvnrepository.com/artifact/com.github.stephengold/jbullet
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'
}
// implementation('de.dfki.mary:voice-cmu-awb-time:5.2')
// {
// exclude group: 'commons-io', module: 'commons-io'
// }
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'
}
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'
}
implementation('de.dfki.mary:voice-cmu-rms-hsmm:5.2')
{
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-obadiah-hsmm:5.2')
{
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-cmu-rms-hsmm:5.2')
{
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-cmu-bdl-hsmm:5.2')
{
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:marytts-lang-en: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 '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.11'
// 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"
)
}
}
shadowJar {
zip64 true
//mainClassName = 'com.neuronrobotics.bowlerstudio.BowlerKernel'
if (project == rootProject) {
baseName = 'bowler-kernel'
classifier = ""
}else {
archiveBaseName.set('bowler-kernel')
archiveClassifier.set('')
archiveVersion.set('')
}
mergeServiceFiles()
}
group = "com.neuronrobotics"
archivesBaseName = "bowler-script-kernel"
task javadocJar(type: Jar) {
if (project == rootProject)
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
if (project == rootProject)
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar, jar
}
test {
testLogging {
exceptionFormat = 'full'
}
}
/*
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'Bowler Scripting Kernel'
packaging 'jar'
// optionally artifactId can be defined here
description 'A command line utility for accsing the bowler framework.'
url 'http://neuronrobotics.com'
scm {
connection 'scm:git:https://github.com/NeuronRobotics/bowler-script-kernel.git'
developerConnection 'scm:git:[email protected]:NeuronRobotics/bowler-script-kernel.git'
url 'https://github.com/NeuronRobotics/bowler-script-kernel'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'madhephaestus'
name 'Kevin Harrington'
email '[email protected]'
}
}
}
}
}
}
*/