-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
53 lines (40 loc) · 1.15 KB
/
build.gradle.kts
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
plugins {
// Important to add shadow plugin first
id("com.gradleup.shadow") version "8.3.5"
id("qupath-conventions")
}
qupathExtension {
name = "qupath-extension-jpen"
version = "0.4.0-SNAPSHOT"
group = "io.github.qupath"
description = "QuPath extension to support graphic tablet input using JPen"
automaticModule = "qupath.extension.jpen"
}
val libName = "jpen-2.0.0"
val libZipped = file("libs/${libName}-lib.zip")
val libUnzipped = project.layout.buildDirectory.file("unpacked/")
tasks.register<Copy>("extractLibs") {
description = "Extract JPen library (required before building)"
group = "QuPath"
from(zipTree(libZipped))
into(libUnzipped)
}
tasks.compileJava.configure {
dependsOn("extractLibs")
}
tasks.shadowJar {
from(project.layout.buildDirectory.file("unpacked/${libName}")) {
into("natives/")
include("'*.dll")
include("*.jnilib")
include("*.so")
}
}
dependencies {
implementation(fileTree(project.layout.buildDirectory.file("unpacked/${libName}")) { include("jpen-2.jar") })
shadow(libs.bundles.qupath)
shadow(libs.bundles.logging)
// For testing
testImplementation(libs.bundles.qupath)
testImplementation(libs.junit)
}