-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
80 lines (69 loc) · 2.35 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
//file:noinspection ConfigurationAvoidance
//file:noinspection GroovyAssignabilityCheck
//file:noinspection GroovyAccessibility
plugins {
id 'java'
id 'application'
id 'java-library'
id 'org.bytedeco.gradle-javacpp-platform' version "1.5.10"
}
ext {
javacppPlatform = 'linux-x86_64,macosx-x86_64,windows-x86_64'
}
group = 'net.bowen'
version = '0.0.1-alpha'
repositories {
mavenCentral()
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
api('org.bytedeco:javacv:1.5.10') {
exclude group: 'org.bytedeco', module: 'artoolkitplus'
exclude group: 'org.bytedeco', module: 'ffmpeg'
exclude group: 'org.bytedeco', module: 'flycapture'
exclude group: 'org.bytedeco', module: 'leptonica'
exclude group: 'org.bytedeco', module: 'libdc1394'
exclude group: 'org.bytedeco', module: 'libfreenect'
exclude group: 'org.bytedeco', module: 'libfreenect2'
exclude group: 'org.bytedeco', module: 'librealsense'
exclude group: 'org.bytedeco', module: 'librealsense2'
exclude group: 'org.bytedeco', module: 'openblas'
exclude group: 'org.bytedeco', module: 'opencv'
exclude group: 'org.bytedeco', module: 'tesseract'
exclude group: 'org.bytedeco', module: 'videoinput'
}
// The GPL dependency enable us to use H.265/HEVC codec(libx265 GPL license problem).
api('org.bytedeco:ffmpeg-platform-gpl:6.1.1-1.5.10') {
exclude group: 'org.bytedeco', module: 'javacpp-platform'
}
}
test {
useJUnitPlatform()
}
application {
mainClassName = 'net.okt.Main'
}
task runWithTaiwaneseSampleFile(type: JavaExec) {
mainClass = 'net.okt.Main'
classpath = sourceSets.main.runtimeClasspath
args = ['samples/LiuLongKid/LiuLongKid.properties']
}
task runWithEnglishSmapleFile(type: JavaExec) {
mainClass = 'net.okt.Main'
classpath = sourceSets.main.runtimeClasspath
args = ['samples/MyGrandFathersClock/clock.properties']
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
task fatJar(type: Jar) {
manifest {
attributes 'Main-Class': application.mainClass
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
with jar
}