-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathbuild.gradle
More file actions
72 lines (58 loc) · 2.26 KB
/
Copy pathbuild.gradle
File metadata and controls
72 lines (58 loc) · 2.26 KB
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
plugins {
id 'java-library'
id 'org.bytedeco.gradle-javacpp-platform' version "1.5.10"
}
group 'ch.bildspur'
version '0.10.0'
sourceCompatibility = 17
repositories {
mavenCentral()
mavenLocal()
maven { url 'https://jitpack.io' }
maven { url 'https://jogamp.org/deployment/maven' }
}
configurations {
processing
// Use compileOnly so processing libs are not included in the fat jar (runtime)
compileOnly.extendsFrom processing
// Allow tests to see processing libs
testImplementation.extendsFrom processing
}
tasks.named('jar') {
archiveFileName = "${outputName}.jar"
}
dependencies {
// compile
testImplementation group: 'junit', name: 'junit', version: '4.13.1'
testImplementation 'com.github.cansik:webcam-capture-processing:8f1ea8d38d'
// opencv (make sure you have updated the local maven repo: mvn -U compile)
implementation(group: 'org.bytedeco', name: 'javacv', version: "1.5.12") {
exclude group: 'org.bytedeco', module: 'librealsense2'
exclude group: 'org.bytedeco', module: 'librealsense2-platform'
}
implementation group: 'org.bytedeco', name: 'opencv-platform', version: "4.11.0-1.5.12"
implementation group: 'org.bytedeco', name: 'openblas-platform', version: "0.3.30-1.5.12"
implementation group: 'org.bytedeco', name: 'tesseract-platform', version: "5.5.1-1.5.12"
// cuda additions
if (project.hasProperty("cuda")) {
implementation group: 'org.bytedeco', name: 'opencv-platform-gpu', version: "4.11.0-1.5.12"
implementation group: 'org.bytedeco', name: 'cuda-platform-redist', version: "12.9-9.10-1.5.12"
}
// processing
processing group: 'org.processing', name: 'core', version: '4.5.0'
processing group: 'org.jogamp.gluegen', name: 'gluegen-rt-main', version: '2.5.0'
processing group: 'org.jogamp.jogl', name: 'jogl-all-main', version: '2.5.0'
}
tasks.register('fatJar', Jar) {
archiveFileName = "$outputName-complete.jar"
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
dependsOn configurations.runtimeClasspath
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
with jar
}
// add processing library support
apply from: "processing-library.gradle"