From d1ed46860c9dd772665c09e9e213bf9aebd1f426 Mon Sep 17 00:00:00 2001 From: Dennis Sheirer Date: Sat, 30 Oct 2021 10:00:19 -0400 Subject: [PATCH] Updates gradle wrapper to use version 7.2 and updates build script for 7.2 compatibility. --- .idea/misc.xml | 2 +- build.gradle | 50 ++++++++----------- .../controller/NamingThreadFactory.java | 4 +- 3 files changed, 23 insertions(+), 33 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index c1f2e324..358cf5b7 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,7 +1,7 @@ - + \ No newline at end of file diff --git a/build.gradle b/build.gradle index b26f1708..f8d49661 100644 --- a/build.gradle +++ b/build.gradle @@ -23,8 +23,8 @@ plugins { id 'application' id 'java' id 'idea' - id 'org.openjfx.javafxplugin' version '0.0.8' - id 'org.beryx.runtime' version '1.11.4' + id 'org.openjfx.javafxplugin' version '0.0.10' + id 'org.beryx.runtime' version '1.12.7' } repositories { @@ -33,8 +33,8 @@ repositories { maven { url "https://jitpack.io" } } -version = '0.5.0-alpha6' -sourceCompatibility = '13' +version = '0.5.0-alpha7' +sourceCompatibility = '17' sourceSets { main.java.srcDirs 'src/main' @@ -82,7 +82,7 @@ dependencies { implementation 'org.apache.commons:commons-math3:3.6.1' implementation 'org.apache.mina:mina-core:2.1.3' implementation 'org.apache.mina:mina-http:2.1.3' - implementation 'org.controlsfx:controlsfx:11.0.2' + implementation 'org.controlsfx:controlsfx:11.1.0' implementation 'org.rauschig:jarchivelib:1.0.0' implementation 'org.slf4j:slf4j-api:1.7.25' @@ -90,20 +90,6 @@ dependencies { implementation 'org.usb4java:usb4java:1.3.0' implementation 'org.usb4java:usb4java-javax:1.3.0' implementation 'pl.edu.icm:JLargeArrays:1.6' - - //These must remain as compile options to ensure they are included in the build to produce multi-OS images - compileOnly "org.openjfx:javafx-base:15:win" - compileOnly "org.openjfx:javafx-base:15:linux" - compileOnly "org.openjfx:javafx-base:15:mac" - compileOnly "org.openjfx:javafx-controls:15:win" - compileOnly "org.openjfx:javafx-controls:15:linux" - compileOnly "org.openjfx:javafx-controls:15:mac" - compileOnly "org.openjfx:javafx-graphics:15:win" - compileOnly "org.openjfx:javafx-graphics:15:linux" - compileOnly "org.openjfx:javafx-graphics:15:mac" - compileOnly "org.openjfx:javafx-swing:15:win" - compileOnly "org.openjfx:javafx-swing:15:linux" - compileOnly "org.openjfx:javafx-swing:15:mac" } application { @@ -118,8 +104,14 @@ idea { } javafx { - version = "15" + version = "17.0.1" modules = ['javafx.base', 'javafx.controls', 'javafx.graphics', 'javafx.swing'] + configuration = "implementation" +} + +run { +// jvmArgs = ['--add-exports=javafx.base/com.sun.javafx.event=ALL-UNNAMED'] + jvmArgs = ['--add-exports javafx.base/com.sun.javafx.event=org.controlsfx.controls'] } jar { @@ -136,17 +128,17 @@ jar { } /** - * Java Development Kit (JDK) locations. In order to build OS-specific images, these paths must point to the 'bin' - * directory within a JDK for each of the specified architectures. These JDKs are used by the runtime and runtimeZip - * tasks to produce platform-specific builds. If none of these paths exists, then an image will be created for the - * host OS using the installed JDK. + * Java Development Kit (JDK) locations. In order to build OS-specific images, these paths must point to the parent + * directory containing the 'bin' directory within a JDK for each of the specified architectures. These JDKs are used + * by the runtime and runtimeZip tasks to produce platform-specific builds. If none of these paths exists, then an + * image will be created for the host OS using the installed JDK. */ -def jdk_base = '/media/denny/WD250GB/java/bellsoft/' +def jdk_base = '/home/denny/java_jdks/' -def jdk_linux_arm64 = jdk_base + 'linux-arm64/jdk-15' -def jdk_linux_x86_64 = jdk_base + 'linux-x64/jdk-15' -def jdk_osx_x86_64 = jdk_base + 'osx-x64/jdk-15.jdk' -def jdk_windows_x86_64 = jdk_base + 'windows-x64/jdk-15' +def jdk_linux_arm64 = jdk_base + 'linux-arm64/jdk-17.0.1-full' +def jdk_linux_x86_64 = jdk_base + 'linux-x64/jdk-17.0.1-full' +def jdk_osx_x86_64 = jdk_base + 'osx-x64/jdk-17.0.1-full.jdk' +def jdk_windows_x86_64 = jdk_base + 'windows-x64/jdk-17.0.1-full' def file_jdk_linux_arm64 = new File(jdk_linux_arm64) def file_jdk_linux_x86_64 = new File(jdk_linux_x86_64) diff --git a/src/main/java/io/github/dsheirer/controller/NamingThreadFactory.java b/src/main/java/io/github/dsheirer/controller/NamingThreadFactory.java index b8ef09a5..7bb8ac44 100644 --- a/src/main/java/io/github/dsheirer/controller/NamingThreadFactory.java +++ b/src/main/java/io/github/dsheirer/controller/NamingThreadFactory.java @@ -24,9 +24,7 @@ public class NamingThreadFactory implements ThreadFactory public NamingThreadFactory( String prefix ) { - SecurityManager s = System.getSecurityManager(); - - mThreadGroup = (s != null)? s.getThreadGroup() : Thread.currentThread().getThreadGroup(); + mThreadGroup = Thread.currentThread().getThreadGroup(); mNamePrefix = prefix + " pool-" + mPoolNumber.getAndIncrement() + "-thread-"; }