-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
97 lines (78 loc) · 3.33 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
buildscript {
ext.kotlin_version = '1.0.4'
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
def openCVJavaDir = getProperty("openCVJavaDir")
group 'org.teamtators.vision'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'kotlin'
repositories {
flatDir {
dirs openCVJavaDir
}
maven {
url = "http://first.wpi.edu/FRC/roborio/maven/development"
}
mavenCentral()
}
configurations {
javaCpp
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
compile group: 'edu.wpi.first.wpilib.networktables.java', name: 'NetworkTables', version: '3.0.0-SNAPSHOT', classifier: 'desktop'
compile group: 'edu.wpi.first.wpilib.networktables.java', name: 'NetworkTables', version: '3.0.0-SNAPSHOT', classifier: 'arm'
compile group: 'org.opencv', name: 'opencv-310'
files 'libopencv_java310.so'
compile group: 'org.bytedeco', name: 'javacpp', version: '1.2.4'
javaCpp group: 'org.bytedeco', name: 'javacpp', version: '1.2.4'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.21'
compile group: 'org.slf4j', name: 'jul-to-slf4j', version: '1.7.21'
compile group: 'ch.qos.logback', name: 'logback-core', version: '1.1.7'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.1.7'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.8.1'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.1'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.8.1'
compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.8.1'
compile group: 'com.fasterxml.jackson.module', name: 'jackson-module-kotlin', version: '2.8.1'
compile group: 'com.fasterxml.jackson.module', name: 'jackson-module-jsonSchema', version: '2.8.1'
compile group: 'org.glassfish.grizzly', name: 'grizzly-http-server', version: '2.3.25'
compile group: 'com.google.guava', name: 'guava', version: '19.0'
compile group: 'com.google.inject', name: 'guice', version: '4.1.0'
}
task buildJavaCpp(dependsOn: 'classes', group: 'build') << {
println 'javacpp'
javaexec {
classpath configurations.javaCpp
main 'org.bytedeco.javacpp.tools.Builder'
args '-cp', compileJava.destinationDir, 'org.teamtators.vision.vision.Raspicam',
'-properties', 'linux-armhf',
'-Dplatform.includepath=' + file('./raspicam/src').absolutePath,
'-Dplatform.root=/usr/local/armv8-rpi3-linux-gnueabihf',
'-Dplatform.compiler=/usr/local/armv8-rpi3-linux-gnueabihf/bin/armv8-rpi3-linux-gnueabihf-g++'
// '-d', 'libs/armeabi'
}
println 'javacpp done'
}
def mainClassName = 'org.teamtators.vision.MainKt'
jar {
manifest {
attributes(
'Main-Class': mainClassName,
"Class-Path": configurations.compile.collect { it.getName() }.join(' ')
)
}
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
task run(type: JavaExec) {
main = mainClassName
classpath = sourceSets.main.runtimeClasspath
systemProperty "tatorvision.opencvjavadir", openCVJavaDir
}