-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
74 lines (66 loc) · 2.99 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
74 lines (66 loc) · 2.99 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
73
74
plugins {
id("com.gradleup.shadow") version "8.3.5"
id("qupath-conventions")
id("com.github.spotbugs") version "6.5.0"
}
qupathExtension {
name = "qupath-extension-image-export-toolkit"
group = "io.github.uw-loci"
version = "1.2.8"
description = "QuIET - QuPath Image Export Toolkit. Comprehensive export of rendered overlays, label masks, raw pixel data, and ML training tiles with wizard UI, script generation, and batch processing."
automaticModule = "io.github.uw-loci.extension.quiet"
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
shadow(libs.bundles.qupath)
shadow(libs.bundles.logging)
shadow(libs.qupath.fxtras)
shadow("org.jfree:org.jfree.svg:5.0.6")
// Gson for the JSON export-recipe (ExportRecipe save/load).
shadow("com.google.code.gson:gson:2.13.2")
testImplementation(libs.bundles.qupath)
testImplementation("org.junit.jupiter:junit-jupiter:5.9.1")
// Required from Gradle 9: the launcher is no longer added to the test
// runtime classpath automatically, and its absence reports as
// "Failed to load JUnit Platform" rather than a missing dependency.
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation("org.assertj:assertj-core:3.24.2")
testImplementation(libs.bundles.logging)
testImplementation(libs.qupath.fxtras)
testImplementation("org.jfree:org.jfree.svg:5.0.6")
testImplementation("com.google.code.gson:gson:2.13.2")
}
tasks.withType<JavaCompile> {
options.release.set(21) // QuPath 0.7 runs on Java 21; pin bytecode target so any build JDK emits loadable classes
options.compilerArgs.add("-Xlint:deprecation")
options.compilerArgs.add("-Xlint:unchecked")
}
tasks.test {
useJUnitPlatform()
}
// ---------------------------------------------------------------------------
// SpotBugs -- static bug detection (gates the build)
// ---------------------------------------------------------------------------
spotbugs {
effort.set(com.github.spotbugs.snom.Effort.MAX)
reportLevel.set(com.github.spotbugs.snom.Confidence.HIGH)
excludeFilter.set(file("config/spotbugs/exclude.xml"))
}
tasks.withType<com.github.spotbugs.snom.SpotBugsTask>().configureEach {
reports.create("html") { required.set(true) }
}
// QuPath 0.7.0's maven artifacts are published as requiring JVM 25 (org.gradle.jvm.version=25),
// even though the QuPath app runs on Java 21. options.release=21 makes Gradle resolve a
// JVM-21-compatible classpath, which then rejects those JVM-25 artifacts on a clean build. Force
// the resolvable classpaths to request JVM 25 so the deps resolve; bytecode target (21) is
// unaffected, so the jar still loads on Java 21. (Upstream QuPath metadata bug; remove if fixed.)
configurations.configureEach {
if (isCanBeResolved) {
attributes {
attribute(org.gradle.api.attributes.java.TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 25)
}
}
}