diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 432fda3..6ac6677 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -18,6 +18,10 @@ on: branches: - master +env: + JAVA_VERSION: '17.0.8+7' + JAVA_DISTRIBUTION: 'temurin' + jobs: analyze: name: Analyze @@ -30,11 +34,19 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'java' ] + language: [ 'java-kotlin' ] steps: - name: Checkout repository uses: actions/checkout@v3 + - name: Set up JDK + uses: actions/setup-java@v3 + with: + java-version: ${{ env.JAVA_VERSION }} + distribution: ${{ env.JAVA_DISTRIBUTION }} + cache: gradle + - name: Verify Gradle wrapper + uses: gradle/wrapper-validation-action@v1 - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: diff --git a/build.gradle b/build.gradle index 9c09b4e..8470f1a 100644 --- a/build.gradle +++ b/build.gradle @@ -18,15 +18,16 @@ */ plugins { id 'application' - id 'org.openjfx.javafxplugin' version '0.0.13' - id 'com.github.ben-manes.versions' version '0.46.0' - id 'org.beryx.jlink' version '2.26.0' + id 'org.openjfx.javafxplugin' version '0.1.0' + id 'org.javamodularity.moduleplugin' version '1.8.12' + id 'com.github.ben-manes.versions' version '0.49.0' + id 'org.beryx.jlink' version '3.0.1' id 'jacoco' - id 'net.ltgt.errorprone' version '3.0.1' - id 'org.sonarqube' version '4.0.0.2929' + id 'net.ltgt.errorprone' version '3.1.0' + id 'org.sonarqube' version '4.4.1.3373' id 'org.ysb33r.cloudci' version '4.0.0' id 'com.github.hierynomus.license' version '0.16.1' - id 'io.miret.etienne.sass' version '1.4.2' + id 'io.miret.etienne.sass' version '1.5.0' } group 'com.github.mfl28' @@ -38,7 +39,7 @@ repositories { dependencies { // Junit (Unit testing) - testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2' + testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0' // TestFx UI TesTing // https://mvnrepository.com/artifact/org.testfx/testfx-junit5 testImplementation('org.testfx:testfx-junit5:4.0.17') { @@ -46,7 +47,7 @@ dependencies { } // https://mvnrepository.com/artifact/nl.jqno.equalsverifier/equalsverifier - testImplementation 'nl.jqno.equalsverifier:equalsverifier:3.14.1' + testImplementation 'nl.jqno.equalsverifier:equalsverifier:3.15.2' // Hamcrest https://mvnrepository.com/artifact/org.hamcrest/hamcrest testImplementation 'org.hamcrest:hamcrest:2.2' @@ -55,13 +56,13 @@ dependencies { testImplementation 'org.mockito:mockito-inline:5.2.0' // Mockito-Junit https://mvnrepository.com/artifact/org.mockito/mockito-junit-jupiter - testImplementation 'org.mockito:mockito-junit-jupiter:5.2.0' + testImplementation 'org.mockito:mockito-junit-jupiter:5.6.0' // Commons Collections https://mvnrepository.com/artifact/org.apache.commons/commons-collections4 implementation 'org.apache.commons:commons-collections4:4.4' // Commons Lang https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 - implementation 'org.apache.commons:commons-lang3:3.12.0' + implementation 'org.apache.commons:commons-lang3:3.13.0' // ControlsFX https://mvnrepository.com/artifact/org.controlsfx/controlsfx implementation('org.controlsfx:controlsfx:11.1.2') { @@ -69,31 +70,31 @@ dependencies { } // Caffeine https://mvnrepository.com/artifact/com.github.ben-manes.caffeine/caffeine - implementation 'com.github.ben-manes.caffeine:caffeine:3.1.5' + implementation 'com.github.ben-manes.caffeine:caffeine:3.1.8' // Gradle plugin to use the error-prone compiler https://github.com/tbroyer/gradle-errorprone-plugin - errorprone 'com.google.errorprone:error_prone_core:2.18.0' + errorprone 'com.google.errorprone:error_prone_core:2.23.0' // Google GSON https://github.com/google/gson implementation 'com.google.code.gson:gson:2.10.1' // Jersey REST client https://mvnrepository.com/artifact/org.glassfish.jersey.core/jersey-client - implementation 'org.glassfish.jersey.core:jersey-client:3.1.1' + implementation 'org.glassfish.jersey.core:jersey-client:3.1.3' // HK2 InjectionManager https://mvnrepository.com/artifact/org.glassfish.jersey.inject/jersey-hk2 - implementation 'org.glassfish.jersey.inject:jersey-hk2:3.1.1' + implementation 'org.glassfish.jersey.inject:jersey-hk2:3.1.3' // Jersey Multipart https://mvnrepository.com/artifact/org.glassfish.jersey.media/jersey-media-multipart - implementation 'org.glassfish.jersey.media:jersey-media-multipart:3.1.1' + implementation 'org.glassfish.jersey.media:jersey-media-multipart:3.1.3' // Jaxb runtime https://mvnrepository.com/artifact/org.glassfish.jaxb/jaxb-runtime - implementation 'org.glassfish.jaxb:jaxb-runtime:4.0.2' + implementation 'org.glassfish.jaxb:jaxb-runtime:4.0.4' // Mimepull https://mvnrepository.com/artifact/org.jvnet.mimepull/mimepull implementation 'org.jvnet.mimepull:mimepull:1.10.0' // Xml bind https://mvnrepository.com/artifact/jakarta.xml.bind/jakarta.xml.bind-api - implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0' + implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' // https://mvnrepository.com/artifact/jakarta.ws.rs/jakarta.ws.rs-api implementation 'jakarta.ws.rs:jakarta.ws.rs-api:3.1.0' @@ -107,7 +108,7 @@ dependencies { javafx { version = '21.0.1' - modules = ['javafx.controls', 'javafx.swing'] + modules = ['javafx.base', 'javafx.graphics', 'javafx.controls', 'javafx.swing'] } test { @@ -189,7 +190,7 @@ application { } java { - modularity.inferModulePath = true + modularity.inferModulePath = false toolchain { languageVersion.set(JavaLanguageVersion.of(17)) } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180..ccebba7 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e1bef7e..744c64d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c787..79a61d4 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,10 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' @@ -143,12 +143,16 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -205,6 +209,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index 107acd3..6689b85 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,89 +1,92 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega