-
-
Notifications
You must be signed in to change notification settings - Fork 29
/
build.gradle
434 lines (358 loc) · 14.2 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
buildscript {
repositories {
[
//jcenter(),
mavenCentral(),
maven {
url "https://plugins.gradle.org/m2/"
},
mavenLocal()
]
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:5.1.0'
}
}
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");
}
plugins {
id 'com.github.jk1.dependency-license-report' version '1.17'
id 'java'
id 'signing'
id 'application'
id 'eclipse'
}
apply plugin: 'com.github.johnrengelman.shadow'
if (project == rootProject) {
apply plugin: 'application'
}else {
apply plugin: 'java-library'
}
import com.github.jk1.license.render.*
import com.github.jk1.license.importer.*
licenseReport {
// Set output directory for the report data.
// Defaults to ${project.buildDir}/reports/dependency-license.
outputDir = "$projectDir/build/licenses"
// Adjust the configurations to fetch dependencies. Default is 'runtimeClasspath'
// For Android projects use 'releaseRuntimeClasspath' or 'yourFlavorNameReleaseRuntimeClasspath'
// Use 'ALL' to dynamically resolve all configurations:
// configurations = ALL
configurations = ['runtimeClasspath']
// List the ids (in module:name format) to exclude from dependency report. Supports regular expressions.
// By default excludes is empty.
excludes = ['moduleGroup:moduleName']
// Don't include artifacts of project's own group into the report
excludeOwnGroup = false
// Don't exclude bom dependencies.
// If set to true, then all boms will be excluded from the report
excludeBoms = false
// Set custom report renderer, implementing ReportRenderer.
// Yes, you can write your own to support any format necessary.
renderers = [
new XmlReportRenderer('third-party-libs.xml', 'Back-End Libraries'),
new CsvReportRenderer('third-party-libs.csv')
]
}
//apply plugin: 'edu.sc.seis.launch4j'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
// 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 compile.
ext.mainClass = 'com.neuronrobotics.bowlerstudio.BowlerStudio'
File buildDir = file(".");
configurations.all {
exclude module: 'slf4j-log4j12'
}
sourceSets {
test {
java {
srcDirs = [
"test/java/src" ] // Note @Peter's comment below
}
}
}
/*
launch4j {
mainClassName = ext.mainClass
icon = buildDir.getAbsolutePath()+"/src/main/resources/CommonWealthRobotics.ico"
}
*/
Properties props = new Properties()
props.load(new FileInputStream(buildDir.getAbsolutePath()+"/src/main/resources/com/neuronrobotics/bowlerstudio/build.properties"))
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/'}
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/'}
//jcenter()
maven { url 'https://clojars.org/repo' }
maven { url 'https://jline.sourceforge.net/m2repo' }
maven { url 'https://repo.spring.io/milestone'}
maven { url 'https://jenkinsci.artifactoryonline.com/jenkinsci/public/' }
maven { url 'https://plugins.gradle.org/m2/' }
//maven { url 'https://dl.bintray.com/clearcontrol/ClearControl' }
maven { url "https://jitpack.io" }
//maven { url 'https://dl.bintray.com/commonwealthrobotics/maven-artifacts' }
}
dependencies {
implementation group: 'org.json', name: 'json', version: '20180813'
implementation 'com.google.crypto.tink:tink:1.3.0-rc1'
implementation 'gov.nist.math:jama:1.0.2'
implementation group: 'org.fxmisc.richtext', name: 'richtextfx', version: '0.6'
implementation group: 'org.controlsfx', name: 'controlsfx', version: '8.0.6'
implementation group: 'commons-lang', name: 'commons-lang', version: '2.6'
implementation 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'
implementation group: 'com.squareup.okhttp', name: 'okhttp-urlconnection', version: '2.0.0'
implementation group: 'org.mockito', name: 'mockito-all', version: '1.9.5'
implementation group: 'com.infradna.tool', name: 'bridge-method-injector', version: '1.14'
//compile group: 'com.neuronrobotics', name:'GithubPasswordManager', version:'0.6.1'
implementation 'com.miglayout:miglayout-swing:4.2'
implementation 'commons-io:commons-io:2.6'
implementation group:'org.python',name:'jython',version:'2.5.3'
implementation group:'org.python',name:'jython-standalone',version:'2.5.2'
implementation 'org.clojure:clojure:1.8.0'
// jetty server
implementation "org.eclipse.jetty:jetty-server:9.4.36.v20210114"
implementation "org.eclipse.jetty:jetty-servlet:9.4.36.v20210114"
implementation "org.eclipse.jetty:jetty-servlets:9.4.36.v20210114"
implementation "org.eclipse.jetty:jetty-webapp:9.4.36.v20210114"
implementation "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"
implementation group: 'java3d', name: 'vecmath', version: '1.3.1'
implementation 'org.slf4j:slf4j-simple:1.6.1'
//implementation "com.neuronrobotics:CHDK-PTP-Java:0.5.3-SNAPSHOT"
//compile "com.neuronrobotics:java-bowler:3.25.4"
//compile fileTree (dir: '../java-bowler/build/libs/', includes: ['nrsdk-3.23.3-jar-with-dependencies.jar'])
implementation "com.neuronrobotics: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'
implementation 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'
implementation 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")
implementation 'com.google.code.gson:gson:2.5'
implementation 'org.jsoup:jsoup:1.8.3'
implementation 'org.apache.httpcomponents:httpclient:4.5.1'
//compile 'cz.advel.jbullet:jbullet:20101010-1'
//compile 'org.bubblecloud.jbullet:jbullet:2.72.2.4'// replaced by local jar because jbullet maven 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'
implementation 'javax.media:jmf:2.1.1e'
//Weka
//compile 'nz.ac.waikato.cms.weka:weka-stable:3.6.13'
//Firmata
implementation 'com.github.kurbatov:firmata4j:2.3.4.1'
implementation group: 'jfree', name: 'jfreechart', version: '1.0.12'
//compile fileTree (dir: '../bowler-script-kernel/build/libs', includes: ['BowlerScriptingKernel-0.25.4.jar'])
testImplementation group: 'junit', name: 'junit', version: '4.10'
//compile "org.jfxtras:jfxtras-common:8.0-r4"
//compile "org.jfxtras:jfxtras-fxml:8.0-r4"
//compile "org.jfxtras:jfxtras-controls:8.0-r4"
//compile "org.jfxtras:jfxtras-agenda:8.0-r4"
//compile "org.jfxtras:jfxtras-window:8.0-r4"
//compile "org.jfxtras:jfxtras-menu:8.0-r4"
//compile "org.jfxtras:jfxtras-labs:8.0-r4"
//https://bintray.com/clearcontrol/ClearControl/DockFX
//compile 'org.dockfx:DockFX:0.1.12'
//compile 'com.github.movisens:SmartGattLib:1.7'
// https://mvnrepository.com/artifact/org.apache.xmlrpc/xmlrpc-client
implementation group: 'org.apache.xmlrpc', name: 'xmlrpc-client', version: '3.1.3'
// https://mvnrepository.com/artifact/com.abercap/odoo-java-api
//compile group: 'com.abercap', name: 'odoo-java-api', version: '1.1.0.RELEASE'
//http://www.jocl.org/
//compile group: 'org.jocl', name: 'jocl', version: '2.0.0'
// https://mvnrepository.com/artifact/com.nativelibs4java/jnaerator
//compile group: 'com.nativelibs4java', name: 'jnaerator', version: '0.11'
// https://mvnrepository.com/artifact/com.github.kurbatov/firmata4j
// https://mvnrepository.com/artifact/com.fifesoft/rsyntaxtextarea
implementation group: 'com.fifesoft', name: 'rsyntaxtextarea', version: '3.4.1'
//compile 'org.bubblecloud.jbullet:jbullet:2.72.2.4'
// https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-svggen
implementation group: 'org.apache.xmlgraphics', name: 'batik-all', version: '1.17'
// https://mvnrepository.com/artifact/org.axsl.org.w3c.dom.svg/svg-dom-java
implementation group: 'org.axsl.org.w3c.dom.svg', name: 'svg-dom-java', version: '1.1'
//compile fileTree (dir: 'libraries/bowler-script-kernel/libs/', includes: ['*.jar'])
implementation project('libraries:bowler-script-kernel:java-bowler')
implementation project('libraries:bowler-script-kernel')
//compile project(':libraries:bowler-script-kernel:JCSG')
implementation project('libraries:dockfx')
implementation project('libraries:bowler-script-kernel:GithubPasswordManager:GithubPasswordManager')
//compile project(':kinematics-chef')
//compile 'com.neuronrobotics:kinematics-chef-core:0.0.15'
//compile fileTree (dir: 'libraries/java-bowler/libs/', includes: ['*.jar'])
implementation 'com.google.guava:guava:19+'
implementation 'org.kohsuke.stapler:stapler:1.263'
implementation group: 'org.kohsuke', name: 'wordnet-random-name', version: '1.2'
//https://github.com/HanSolo/Medusa
implementation group: 'eu.hansolo', name: 'Medusa', version: '7.1'
//MuJoCo
implementation group: 'org.bytedeco', name: 'javacpp', version: '1.5.7'
implementation group: 'com.neuronrobotics', name: 'mujoco-java', version:'3.1.3-pre.11'
// Zip and unzip, tar and untar
implementation 'org.apache.commons:commons-compress:1.26.2'
}
// create a fat-jar (class files plus dependencies
// excludes VRL.jar (plugin jar files must not start with 'vrl-\\d+')
jar {
//zip64 true
jar.duplicatesStrategy = DuplicatesStrategy.EXCLUDE
// project class files compiled from source
//from files(sourceSets.main.output.classesDir)
manifest {
attributes(
"Main-Class": 'com.neuronrobotics.bowlerstudio.BowlerStudio',
"Manifest-Version": "1.0",
"Created-By": "CommonWealth Robotics 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"
)
}
}
task ('showAll') {
doLast {
allprojects.each {
println(it.name+':')
println('-compile:')
configurations.compile.each { c ->
println(' '+c.name)
}
println '-testCompile:'
configurations.testCompile.each { r->
println(' '+ r.name)
}
}
}
}
eclipse{
jdt {
sourceCompatibility = 1.8
targetCompatibility = 1.8
file {
withProperties { properties ->
properties.setProperty('org.eclipse.jdt.core.compiler.problem.forbiddenReference', 'ignore')
}
}
}
}
shadowJar {
zip64 true
mainClassName = 'com.neuronrobotics.bowlerstudio.BowlerStudio'
if (project == rootProject) {
baseName = 'BowlerStudio'
classifier = ""
}else {
archiveBaseName.set('BowlerStudio')
archiveClassifier.set('')
archiveVersion.set('')
}
mergeServiceFiles()
}