355 lines
13 KiB
Groovy
355 lines
13 KiB
Groovy
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
dependencies {
|
|
classpath 'com.github.jengelman.gradle.plugins:shadow:5.0.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");
|
|
}
|
|
|
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
apply plugin: 'java'
|
|
apply plugin: 'java'
|
|
apply plugin: 'signing'
|
|
apply plugin: 'maven'
|
|
apply plugin: 'application'
|
|
|
|
//apply plugin: 'edu.sc.seis.launch4j'
|
|
|
|
sourceCompatibility = '1.8'
|
|
[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 {
|
|
maven { url 'https://oss.sonatype.org/service/local/repositories/releases/content/' }
|
|
|
|
//com.neuronrobotics hosting point
|
|
maven { url 'https://oss.sonatype.org/content/repositories/staging/' }
|
|
mavenCentral()
|
|
jcenter()
|
|
maven { url 'https://repository-bubblecloud.forge.cloudbees.com/release/'}
|
|
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://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/' }
|
|
maven { url 'https://dl.bintray.com/commonwealthrobotics/maven-artifacts' }
|
|
maven { url "https://dl.bintray.com/s1m0nw1/KtsRunner" }
|
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
compile group: 'org.json', name: 'json', version: '20180813'
|
|
compile 'com.google.crypto.tink:tink:1.3.0-rc1'
|
|
|
|
compile 'gov.nist.math:jama:1.0.2'
|
|
|
|
compile group: 'org.fxmisc.richtext', name: 'richtextfx', version: '0.6'
|
|
|
|
compile group: 'org.reactfx', name: 'reactfx', version: '2.0-SNAPSHOT'
|
|
|
|
compile group: 'org.codehaus.groovy', name: 'groovy', version:'2.3.7';
|
|
//make grapes work
|
|
compile group: 'org.apache.ivy', name:'ivy', version:'2.2.0'
|
|
|
|
compile group: 'org.controlsfx', name: 'controlsfx', version: '8.0.6'
|
|
compile group: 'commons-lang', name: 'commons-lang', version: '2.6'
|
|
compile group: 'commons-codec', name: 'commons-codec', version: '1.7'
|
|
compile 'org.kohsuke.stapler:stapler:1.237'
|
|
|
|
// https://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit
|
|
compile group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: '5.6.0.201912101111-r'
|
|
|
|
compile group: 'com.squareup.okhttp', name: 'okhttp-urlconnection', version: '2.0.0'
|
|
compile group: 'org.kohsuke', name: 'wordnet-random-name', version: '1.2'
|
|
compile group: 'org.mockito', name: 'mockito-all', version: '1.9.5'
|
|
compile group: 'com.infradna.tool', name: 'bridge-method-injector', version: '1.14'
|
|
compile group: 'com.neuronrobotics', name:'GithubPasswordManager', version:'0.5.0'
|
|
|
|
compile 'com.miglayout:miglayout-swing:4.2'
|
|
compile 'commons-io:commons-io:2.4'
|
|
compile group:'org.python',name:'jython',version:'2.5.3'
|
|
compile group:'org.python',name:'jython-standalone',version:'2.5.2'
|
|
compile 'org.clojure:clojure:1.8.0'
|
|
// jetty server
|
|
compile "org.eclipse.jetty:jetty-server:9.0.2.v20130417"
|
|
compile "org.eclipse.jetty:jetty-servlet:9.0.2.v20130417"
|
|
compile "org.eclipse.jetty:jetty-servlets:9.0.2.v20130417"
|
|
compile "org.eclipse.jetty:jetty-webapp:9.0.2.v20130417"
|
|
compile "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"
|
|
compile group: 'java3d', name: 'vecmath', version: '1.3.1'
|
|
compile 'org.slf4j:slf4j-simple:1.6.1'
|
|
|
|
//compile "com.neuronrobotics:JavaCad:0.14.0"
|
|
compile "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'])
|
|
//compile fileTree (dir: '../JCSG/build/libs/', includes: ['JavaCad-0.8.2.jar'])
|
|
compile "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'
|
|
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'
|
|
|
|
compile 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")
|
|
|
|
compile 'com.google.code.gson:gson:2.5'
|
|
compile 'org.jsoup:jsoup:1.8.3'
|
|
compile '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'
|
|
|
|
compile 'javax.media:jmf:2.1.1e'
|
|
|
|
//Weka
|
|
//compile 'nz.ac.waikato.cms.weka:weka-stable:3.6.13'
|
|
|
|
//Firmata
|
|
compile 'com.github.kurbatov:firmata4j:2.3.4.1'
|
|
|
|
compile group: 'jfree', name: 'jfreechart', version: '1.0.12'
|
|
|
|
//compile fileTree (dir: '../bowler-script-kernel/build/libs', includes: ['BowlerScriptingKernel-0.25.4.jar'])
|
|
testCompile 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
|
|
compile 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
|
|
compile group: 'com.fifesoft', name: 'rsyntaxtextarea', version: '2.6.0'
|
|
|
|
//compile 'org.bubblecloud.jbullet:jbullet:2.72.2.4'
|
|
// https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-svggen
|
|
compile group: 'org.apache.xmlgraphics', name: 'batik-svggen', version: '1.7'
|
|
// https://mvnrepository.com/artifact/org.axsl.org.w3c.dom.svg/svg-dom-java
|
|
compile group: 'org.axsl.org.w3c.dom.svg', name: 'svg-dom-java', version: '1.1'
|
|
|
|
|
|
compile fileTree (dir: 'libs/', includes: ['*.jar'])
|
|
//compile fileTree (dir: 'libraries/bowler-script-kernel/libs/', includes: ['*.jar'])
|
|
compile project(':libraries:bowler-script-kernel:java-bowler')
|
|
compile project(':libraries:bowler-script-kernel')
|
|
compile project(':libraries:bowler-script-kernel:JCSG')
|
|
//compile project(':kinematics-chef')
|
|
//compile 'com.neuronrobotics:kinematics-chef-core:0.0.15'
|
|
|
|
//compile fileTree (dir: 'libraries/java-bowler/libs/', includes: ['*.jar'])
|
|
|
|
|
|
// compile group: 'de.dfki.mary', name: 'voice-cmu-slt-hsmm', version: '5.2'
|
|
// https://mvnrepository.com/artifact/de.dfki.mary/voice-dfki-poppy-hsmm
|
|
compile group: 'de.dfki.mary', name: 'voice-dfki-poppy-hsmm', version: '5.2'
|
|
// https://mvnrepository.com/artifact/de.dfki.mary/voice-dfki-poppy-hsmm
|
|
compile group: 'de.dfki.mary', name: 'voice-dfki-prudence-hsmm', version: '5.2'
|
|
// https://mvnrepository.com/artifact/de.dfki.mary/voice-dfki-poppy-hsmm
|
|
compile group: 'de.dfki.mary', name: 'voice-dfki-spike-hsmm', version: '5.2'
|
|
// https://mvnrepository.com/artifact/de.dfki.mary/marytts-lang-en
|
|
compile group: 'de.dfki.mary', name: 'marytts-lang-en', version: '5.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
|
|
jar.baseName= "BowlerStudio";
|
|
// project class files compiled from source
|
|
//from files(sourceSets.main.output.classesDir)
|
|
|
|
manifest {
|
|
attributes(
|
|
"Main-Class": 'com.neuronrobotics.bowlerstudio.BowlerStudio',
|
|
"SplashScreen-Image": "com/neuronrobotics/nrconsole/images/splash.png",
|
|
"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"
|
|
|
|
|
|
)
|
|
}
|
|
}
|
|
|
|
shadowJar {
|
|
zip64 true
|
|
mainClassName = 'com.neuronrobotics.bowlerstudio.BowlerStudio'
|
|
baseName = 'BowlerStudio'
|
|
classifier = "fat"
|
|
version = props."app.version"
|
|
mergeServiceFiles()
|
|
}
|
|
|
|
//task run(type: JavaExec) {
|
|
// classpath = sourceSets.main.runtimeClasspath
|
|
// main = mainClass;
|
|
// // jvmArgs = ['-Dprism.forceGPU=true', '-Dprism.verbose=true']
|
|
// jvmArgs = ['-Dprism.forceGPU=true']
|
|
//}
|