forked from miho/JFXScad
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
228 lines (189 loc) · 7.79 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
apply plugin: 'java'
apply plugin: 'signing'
apply plugin: 'maven'
apply plugin: 'application'
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 implementation.
if (!hasProperty('mainClass')) {
ext.mainClass = 'com.neuronrobotics.bowlerstudio.BowlerStudio'
}
File buildDir = file(".");
configurations.all {
exclude module: 'slf4j-log4j12'
}
task wrapper(type: Wrapper, description: 'Creates and deploys the Gradle wrapper to the current directory.') {
gradleVersion = '2.1'
}
Properties props = new Properties()
props.load(new FileInputStream(buildDir.getAbsolutePath()+"/src/main/resources/com/neuronrobotics/bowlerstudio/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");
}
repositories {
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/releases/' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'http://repo.jenkins-ci.org/public/' }
maven { url 'http://clojars.org/repo' }
}
dependencies {
/*
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';
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 group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.2.3'
compile group: 'org.kohsuke.stapler', name: 'stapler-jetty', version: '1.1'
compile group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: '4.0.1.201506240215-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: 'org.kohsuke', name: 'github-api', version: '1.66'
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.7.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:JCSG:0.1.4"
compile "com.neuronrobotics:CHDK-PTP-Java:0.5.3-SNAPSHOT"
//compile "com.neuronrobotics:java-bowler:3.16.5"
//compile fileTree (dir: '../java-bowler/build/libs/', includes: ['nrsdk-3.16.4-jar-with-dependencies.jar'])
compile "com.neuronrobotics:WalnutiQ:2.3.1"
String basedir =System.getenv("OPENCV_DIR")+"/../../java/opencv-249.jar";
println("OPENCV_DIR="+basedir);
if(isWindows()){
compile files(basedir)
}
if(isOSX()){
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('/Volumes/Snow Leopard/Applications/BowlerStudio.app/Contents/MacOS/opencv249build/bin/opencv-249.jar')
}
if(isLinux()){
//compile files('/usr/share/java/opencv-249.jar')
compile fileTree (dir: '/usr/share/java/', includes: ['*opencv-24*.jar'])
}
compile group: 'jfree', name: 'jfreechart', version: '1.0.12'
compile group: 'java3d', name: 'vecmath', version: '1.3.1'
compile 'gov.nist.math:jama:1.0.2'
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 group:'com.googlecode.json-simple', name:'json-simple', version:'1.1'
compile 'com.fifesoft:rsyntaxtextarea:2.5.6'
//compile("org.springframework.boot:spring-boot-starter-web:1.2.7.RELEASE")
compile fileTree (dir: 'libs', includes: ['*.jar'])
compile 'org.slf4j:slf4j-simple:1.6.1'
compile 'gov.nist.math:jama:1.0.2'
compile 'com.miglayout:miglayout-swing:4.1'
compile 'org.igniterealtime.smack:smack:3.2.1'
compile 'org.igniterealtime.smack:smackx:3.2.1'
compile 'org.apache.commons:commons-lang3:3.2.1'
compile 'org.usb4java:usb4java:1.2.0'
compile 'org.usb4java:usb4java-javax:1.2.0'
compile "com.neuronrobotics:nrjavaserial:3.11.0"
compile fileTree (dir: '../java-bowler/libs', includes: ['*.jar'])
compile fileTree (dir: '../bowler-script-kernel/libs/', includes: ['*.jar'])
*/
compile "com.neuronrobotics:BowlerScriptingKernel:0.6.8"
//compile fileTree (dir: '../bowler-script-kernel/build/libs', includes: ['BowlerScriptingKernel-0.6.5.jar'])
testCompile group: 'junit', name: 'junit', version: '4.10'
}
// 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";
doFirst {
// dependencies except VRL
from (configurations.runtime.asFileTree.
filter({file->return !file.name.startsWith("vrl-0")}).
files.collect { zipTree(it) } ){
exclude 'META-INF/MANIFEST.MF'
exclude 'META-INF/*.SF'
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
}
}
// project class files compiled from source
//from files(sourceSets.main.output.classesDir)
manifest {
attributes(
"Main-Class": mainClass,
"SplashScreen-Image": "com/neuronrobotics/nrconsole/images/logo.png",
"Manifest-Version": "1.0",
"Created-By": "Neuron Robotics Cooperative",
"Specification-Title": props."app.name",
"Specification-Version": props."app.version",
"Specification-Vendor": "Neuron Robotics Cooperative",,
"Implementation-Title": props."app.name",
"Implementation-Version" : props."app.version",
"Implementation-Vendor": "Neuron Robotics Cooperative"
)
}
}
//task run(type: JavaExec) {
// classpath = sourceSets.main.runtimeClasspath
// main = mainClass;
// // jvmArgs = ['-Dprism.forceGPU=true', '-Dprism.verbose=true']
// jvmArgs = ['-Dprism.forceGPU=true']
//}