@@ -2,11 +2,11 @@ plugins {
22 id ' java'
33 id ' idea'
44 id ' application'
5- id ' com.github.ben-manes.versions' version ' 0.52 .0'
5+ id ' com.github.ben-manes.versions' version ' 0.53 .0'
66 id ' net.nemerosa.versioning' version ' 3.1.0'
77 id ' org.openjfx.javafxplugin' version ' 0.1.0'
8- id ' org.gradlex.extra-java-module-info' version ' 1.12 '
9- id ' org.beryx.jlink' version ' 3.1.1 '
8+ id ' org.gradlex.extra-java-module-info' version ' 1.13.1 '
9+ id ' org.beryx.jlink' version ' 3.1.4-rc '
1010}
1111
1212ext {
1616 moduleName = ' edu.jhuapl.trinity'
1717 mainClassPath = ' edu.jhuapl.trinity.App'
1818 mainClassJarLauncher = ' edu.jhuapl.trinity.TrinityMain'
19- isProdJar = findProperty(' env' ) == ' prod -jar'
20- isProdJlink = findProperty(' env' ) == ' prod -jlink'
19+ isReleaseJar = findProperty(' env' ) == ' release -jar'
20+ isReleaseJlink = findProperty(' env' ) == ' release -jlink'
2121 isDevelopment = findProperty(' env' ) == ' dev'
2222 fxVersion = findProperty(' javafx.version' )
2323 fxStaticVersion = findProperty(' javafx.static.version' )
@@ -40,41 +40,41 @@ println "OS Detected: ${org.gradle.internal.os.OperatingSystem.current()}"
4040
4141repositories {
4242 mavenCentral()
43- maven { url ' https://jitpack.io' }
43+ maven { url = ' https://jitpack.io' }
4444}
4545
4646
4747dependencies {
4848 // Excluding openjfx from 3rd party modules.
49- implementation(group : ' com.github.birdasaur.litfx' , name : ' litfx-controls' , version : ' 0.1.3' ) {
49+ implementation(' com.github.birdasaur.litfx: litfx-controls: 0.1.3' ) {
5050 exclude group : ' org.openjfx'
5151 }
52- implementation(group : ' org.fxyz3d' , name : ' fxyz3d' , version : ' 0.6.0' ) {
52+ implementation(' org.fxyz3d: fxyz3d: 0.6.0' ) {
5353 exclude group : ' org.openjfx'
5454 }
55- implementation(group : ' eu.hansolo.fx' , name : ' charts' , version : ' 21.0.25 ' ) {
55+ implementation(' eu.hansolo.fx: charts: 21.0.27 ' ) {
5656 exclude group : ' org.openjfx'
5757 exclude group : ' ch.qos.logback'
5858 }
59- implementation group : ' com.github.quickhull3d' , name : ' quickhull3d' , version : ' 1.0.0'
60- implementation group : ' org.apache.commons' , name : ' commons-math3' , version : ' 3.6.1'
61- implementation group : ' org.apache.commons' , name : ' commons-lang3' , version : ' 3.18 .0'
62- implementation group : ' org.zeromq' , name : ' jeromq' , version : ' 0.6.0'
63- implementation group : ' com.fasterxml.jackson.core' , name : ' jackson-annotations' , version : ' 2.19.1 '
64- implementation group : ' com.fasterxml.jackson.core' , name : ' jackson-databind' , version : ' 2.19.1 '
65- implementation group : ' com.github.sarxos' , name : ' webcam-capture' , version : ' 0.3.12'
66- implementation group : ' org.jflac' , name : ' jflac-codec' , version : ' 1.5.2'
67- implementation group : ' com.tambapps.fft4j' , name : ' fft4j' , version : ' 2.0'
68- implementation group : ' com.github.trinity-xai' , name : ' SuperMDS' , version : ' v2025.06.29'
69- implementation group : ' org.apache.pdfbox' , name : ' pdfbox' , version : ' 3.0.5 '
59+ implementation ' com.github.quickhull3d: quickhull3d: 1.0.0'
60+ implementation ' org.apache.commons: commons-math3: 3.6.1'
61+ implementation ' org.apache.commons: commons-lang3:3.19 .0'
62+ implementation ' org.zeromq: jeromq: 0.6.0'
63+ implementation ' com.fasterxml.jackson.core: jackson-annotations: 2.19.2 '
64+ implementation ' com.fasterxml.jackson.core: jackson-databind: 2.19.2 '
65+ implementation ' com.github.sarxos: webcam-capture: 0.3.12'
66+ implementation ' org.jflac: jflac-codec: 1.5.2'
67+ implementation ' com.tambapps.fft4j: fft4j: 2.0'
68+ implementation ' com.github.trinity-xai: SuperMDS: v2025.06.29'
69+ implementation ' org.apache.pdfbox: pdfbox: 3.0.6 '
7070
7171 // Enforce slf4j-api version across dependencies
72- implementation group : ' org.slf4j' , name : ' slf4j-api' , version : ' 2.0.17'
73- implementation group : ' ch.qos.logback' , name : ' logback-classic' , version : ' 1.5.18 '
72+ implementation ' org.slf4j: slf4j-api: 2.0.17'
73+ implementation ' ch.qos.logback: logback-classic: 1.5.20 '
7474
75- testImplementation ' org.junit.jupiter:junit-jupiter:5.13.2 '
76- testImplementation ' org.junit.platform:junit-platform-suite:1.13.2 '
77- testRuntimeOnly ' org.junit.platform:junit-platform-launcher:1.13.2 '
75+ testImplementation ' org.junit.jupiter:junit-jupiter:5.15.0 '
76+ testImplementation ' org.junit.platform:junit-platform-suite:1.14.0 '
77+ testRuntimeOnly ' org.junit.platform:junit-platform-launcher:1.14.0 '
7878}
7979
8080// Make sure every single dependency is modularized.
@@ -173,7 +173,7 @@ idea {
173173}
174174
175175tasks. named(' wrapper' , Wrapper ) {
176- gradleVersion = ' 8.14.2 '
176+ gradleVersion = ' 9.1.0 '
177177 distributionType = Wrapper.DistributionType . BIN
178178}
179179
@@ -189,10 +189,10 @@ application {
189189}
190190
191191java {
192- // sourceCompatibility = JavaVersion.VERSION_21 // Use this instead of toolchain.* if you want to manually setup your own JDK
193- // targetCompatibility = JavaVersion.VERSION_21 // Use this instead of toolchain.* if you want to manually setup your own JDK
194- toolchain. languageVersion = JavaLanguageVersion . of(21 )
195- toolchain. vendor = JvmVendorSpec . ADOPTIUM
192+ // sourceCompatibility = JavaVersion.VERSION_25 // Use this instead of toolchain.* if you want to manually setup your own JDK
193+ // targetCompatibility = JavaVersion.VERSION_25 // Use this instead of toolchain.* if you want to manually setup your own JDK
194+ toolchain. languageVersion = JavaLanguageVersion . of(25 )
195+ // toolchain.vendor = JvmVendorSpec.ADOPTIUM
196196 modularity. inferModulePath. set(true )
197197}
198198
@@ -206,7 +206,10 @@ compileJava {
206206// List of Prism Settings
207207// https://github.com/openjdk/jfx/blob/master/modules/javafx.graphics/src/main/java/com/sun/prism/impl/PrismSettings.java
208208run {
209- jvmArgs + = [' -Dprism.maxvram=2G' , ' -Djavafx.animation.fullspeed=true' ]
209+ jvmArgs ' -Dprism.maxvram=2G'
210+ jvmArgs ' -Djavafx.animation.fullspeed=true'
211+ jvmArgs ' --enable-native-access=javafx.graphics'
212+ jvmArgs ' --enable-native-access=javafx.media'
210213}
211214
212215tasks. named(' test' , Test ) {
@@ -253,7 +256,7 @@ processResources {
253256 // Configure Default Logging Path (only applies when logback is enabled)
254257 def logPath = " ${ artifactName} .log" // Note: if you update this make sure to verify/update fileNamePattern below as well
255258 // Log to Console.App on OSX
256- if (isProdJlink && org.gradle.internal.os.OperatingSystem . current(). macOsX) {
259+ if (isReleaseJlink && org.gradle.internal.os.OperatingSystem . current(). macOsX) {
257260 logPath = ' ${user.home}/Library/Logs/' + logPath
258261 }
259262 def logbackProps = [
@@ -345,9 +348,9 @@ tasks.register('fxUberJar', Jar) {
345348 }
346349}
347350
348- artifacts {
349- archives noFxUberJar
350- archives fxUberJar
351+ assemble {
352+ dependsOn( noFxUberJar)
353+ dependsOn( fxUberJar)
351354}
352355
353356// </editor-fold>
@@ -363,11 +366,18 @@ jlink {
363366 options. set([' --strip-debug' , ' --compress' , ' 2' , ' --no-header-files' , ' --no-man-pages' ])
364367 imageZip. set(imageZipFile)
365368 launcher {
369+ def currentOS = org.gradle.internal.os.OperatingSystem . current()
366370 name = artifactNameUpper
367371 mainClass = mainClassPath
372+ noConsole = true // uses javaw instead of java on windows
368373 jvmArgs = [' -Dprism.maxvram=2G' , ' -Djavafx.animation.fullspeed=true' ]
369374 jvmArgs + = [" -Dlogback.configurationFile={{BIN_DIR}}${ fileSep} logback.xml" ]
370- jvmArgs + = [" -Dtrinity.app.dir={{BIN_DIR}}" ]
375+ if (currentOS. windows) {
376+ jvmArgs + = [" -Dtrinity.app.dir={{BIN_DIR}}${ fileSep} " ] // extra fileSep on jlink to ensure .bat file %~dp0 escaping works
377+ } else {
378+ jvmArgs + = [" -Dtrinity.app.dir={{BIN_DIR}}" ]
379+ }
380+ jvmArgs + = [' --enable-native-access=javafx.graphics' , ' --enable-native-access=javafx.media' ]
371381 // jvmArgs += ["--add-exports external.module.name/external.package.name=$sModuleName", ...]
372382 }
373383 // forceMerge('javafx')
@@ -381,6 +391,7 @@ jlink {
381391 jvmArgs = [' -Dprism.maxvram=2G' , ' -Djavafx.animation.fullspeed=true' ]
382392 jvmArgs + = [" -Dlogback.configurationFile=\$ APPDIR${ fileSep} logback.xml" ]
383393 jvmArgs + = [" -Dtrinity.app.dir=\$ APPDIR" ]
394+ jvmArgs + = [' --enable-native-access=javafx.graphics' , ' --enable-native-access=javafx.media' ]
384395 jvmArgs + = [' --module-path' , ' .' ]
385396 if (currentOS. windows) {
386397 skipInstaller = true
0 commit comments