diff --git a/build.gradle.kts b/build.gradle.kts index 8e05f055b..982eec707 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,6 +4,7 @@ import scenery.* import java.net.URL plugins { + `java-library` // kotlin and dokka versions are now managed in settings.gradle.kts and gradle.properties kotlin("jvm") kotlin("kapt") @@ -12,11 +13,12 @@ plugins { scenery.base scenery.publish scenery.sign -// id("com.github.elect86.sciJava") version "0.0.4" jacoco id("com.github.johnrengelman.shadow") apply false } + + repositories { mavenCentral() maven("https://maven.scijava.org/content/groups/public") @@ -41,6 +43,7 @@ val lwjglArtifacts = listOf( "lwjgl-zstd" ) + dependencies { val scijavaParentPomVersion = project.properties["scijavaParentPOMVersion"] val lwjglVersion = project.properties["lwjglVersion"] @@ -113,6 +116,8 @@ dependencies { api("sc.fiji:bigdataviewer-core:10.4.14") api("sc.fiji:bigdataviewer-vistools:1.0.0-beta-28") api("sc.fiji:bigvolumeviewer:0.3.3") { + exclude("sc.fiji", "bigdataviewer-core") + exclude("sc.fiji", "bigdataviewer-vistools") exclude("org.jogamp.gluegen", "gluegen-rt") exclude("org.jogamp.jogl", "jogl-all") } @@ -123,9 +128,8 @@ dependencies { exclude("org.lwjgl", "lwjgl-bom") exclude("org.lwjgl", "lwjgl") } - - implementation("org.janelia.saalfeldlab:n5") - implementation("org.janelia.saalfeldlab:n5-imglib2") +// implementation("org.janelia.saalfeldlab:n5") +// implementation("org.janelia.saalfeldlab:n5-imglib2") listOf("core", "structure", "modfinder").forEach { implementation("org.biojava:biojava-$it:6.0.5") { exclude("org.slf4j", "slf4j-api") @@ -154,6 +158,7 @@ dependencies { val isRelease: Boolean get() = System.getProperty("release") == "true" + tasks { withType().all { kotlinOptions { @@ -165,6 +170,10 @@ tasks { withType().all { targetCompatibility = project.properties["jvmTarget"]?.toString() ?: "21" sourceCompatibility = project.properties["jvmTarget"]?.toString() ?: "21" + + // Set high error limit, such that all JPMS errors are shown, it's over 9000! + options.compilerArgs.addAll("-Xmaxerrs 9001".split(" ")) + } withType().configureEach { diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index d3337eac2..63d485bad 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -11,9 +11,12 @@ repositories { dependencies { implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.9.20") +// implementation("org.gradlex:extra-java-module-info:1.8") } + + //, imagej, imgLib2, scifio, fiji, bigDataViewer, trakEM2, n5, boneJ, ome, omero, //groovy, apache, batik, commons, eclipseCollections, eclipseSwt, googleCloud, jackson, //jetty, jGraphT, jna, jogamp, kotlib, logBack, migLayout, rSyntaxTextArea, slf4j, -//snakeYAML, tensorFlow, junit5, jmh, misc \ No newline at end of file +//snakeYAML, tensorFlow, junit5, jmh, misc diff --git a/buildSrc/src/main/kotlin/scenery/base.gradle.kts b/buildSrc/src/main/kotlin/scenery/base.gradle.kts index aed635f79..fcdb6e4f9 100644 --- a/buildSrc/src/main/kotlin/scenery/base.gradle.kts +++ b/buildSrc/src/main/kotlin/scenery/base.gradle.kts @@ -5,8 +5,21 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent plugins { jacoco +// id("org.gradlex.extra-java-module-info") } +//extraJavaModuleInfo { +//// module("net.imglib2:imglib2", "net.imglib2") { +//// mergeJar("sc.fiji:bigdataviewer-core") +//// } +// +//// automaticModule("sc.fiji:bigdataviewer-core", "bdv") { +//// mergeJar("sc.fiji:bigdataviewer-vistools") +//// } +// +// deriveAutomaticModuleNamesFromFileNames.set(true) +//} + repositories { mavenCentral() } diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java new file mode 100644 index 000000000..2f143d244 --- /dev/null +++ b/src/main/java/module-info.java @@ -0,0 +1,57 @@ +module graphics.scenery { + exports graphics.scenery; + exports graphics.scenery.atomicsimulations; + exports graphics.scenery.attribute; + exports graphics.scenery.backends; + exports graphics.scenery.compute; + exports graphics.scenery.controls; + exports graphics.scenery.effectors; + exports graphics.scenery.fonts; + exports graphics.scenery.geometry; + exports graphics.scenery.net; + exports graphics.scenery.numerics; + exports graphics.scenery.primitives; + exports graphics.scenery.proteins; + exports graphics.scenery.repl; + exports graphics.scenery.serialization; + exports graphics.scenery.textures; + exports graphics.scenery.ui; + exports graphics.scenery.utils; + exports graphics.scenery.volumes; + + requires java.base; + requires java.desktop; + requires java.management; + requires java.logging; + requires jdk.unsupported; + + requires kotlin.stdlib; + requires kotlin.reflect; + requires kotlinx.coroutines.core; + + requires org.joml; + requires org.lwjgl; + requires org.lwjgl.vulkan; + requires org.lwjgl.tinyexr; + requires org.lwjgl.remotery; + requires org.lwjgl.openvr; + requires org.lwjgl.glfw; + requires org.lwjgl.spvc; + requires org.lwjgl.shaderc; + requires org.lwjgl.jemalloc; + requires info.picocli; + requires org.bytedeco.ffmpeg; + requires com.fasterxml.jackson.core; + requires com.fasterxml.jackson.databind; + requires com.fasterxml.jackson.dataformat.yaml; + requires com.fasterxml.jackson.kotlin; +// requires jinput; +// requires trove4j; +// requires org.scijava.ui.behaviour; + requires org.slf4j; + requires bvv; + requires bdv; +// requires bdv.util; + requires net.imglib2.realtransform; + requires net.imglib2; +} diff --git a/src/test/kotlin/graphics/scenery/tests/examples/volumes/OutOfCoreRAIExample.kt b/src/test/kotlin/graphics/scenery/tests/examples/volumes/OutOfCoreRAIExample.kt index 44319e621..79722a96f 100644 --- a/src/test/kotlin/graphics/scenery/tests/examples/volumes/OutOfCoreRAIExample.kt +++ b/src/test/kotlin/graphics/scenery/tests/examples/volumes/OutOfCoreRAIExample.kt @@ -18,10 +18,10 @@ import net.imglib2.img.Img import net.imglib2.img.display.imagej.ImageJFunctions import net.imglib2.type.numeric.integer.UnsignedShortType import net.imglib2.type.volatiles.VolatileUnsignedShortType -import org.janelia.saalfeldlab.n5.GzipCompression -import org.janelia.saalfeldlab.n5.N5FSReader -import org.janelia.saalfeldlab.n5.N5FSWriter -import org.janelia.saalfeldlab.n5.imglib2.N5Utils +//import org.janelia.saalfeldlab.n5.GzipCompression +//import org.janelia.saalfeldlab.n5.N5FSReader +//import org.janelia.saalfeldlab.n5.N5FSWriter +//import org.janelia.saalfeldlab.n5.imglib2.N5Utils import java.nio.file.Files @@ -50,12 +50,12 @@ class OutOfCoreRAIExample: SceneryBase("Out-of-core RAI Rendering example", 1280 // and save it to a temporary location. val datasetName = "testDataset" val n5path = Files.createTempDirectory("scenery-t1-head-n5") - val n5 = N5FSWriter(n5path.toString()) - N5Utils.save(img, n5, datasetName, intArrayOf(img.dimension(0).toInt(), img.dimension(1).toInt(), img.dimension(2).toInt()), GzipCompression()) +// val n5 = N5FSWriter(n5path.toString()) +// N5Utils.save(img, n5, datasetName, intArrayOf(img.dimension(0).toInt(), img.dimension(1).toInt(), img.dimension(2).toInt()), GzipCompression()) // load the multiresolution N5 dataset from the temporary location and wrap it // as [net.imglib2.Volatile] dataset. - val ooc: RandomAccessibleInterval = N5Utils.openVolatile(N5FSReader(n5path.toString()), datasetName) + val ooc: RandomAccessibleInterval? = null //N5Utils.openVolatile(N5FSReader(n5path.toString()), datasetName) val wrapped = VolatileViews.wrapAsVolatile(ooc) // When loading datasets with multiple resolution levels, it's important to use Volatile types