diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 033e24c..1b33c55 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 d4081da..4f5eb9d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index fcb6fca..23d15a9 100755 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -83,7 +85,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -111,7 +114,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -144,7 +147,7 @@ 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 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +155,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -201,16 +204,16 @@ fi # 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"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index 6689b85..5eed7ee 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -43,11 +45,11 @@ 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. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,22 +59,22 @@ 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. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar +set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/mmtc-core/build.gradle.kts b/mmtc-core/build.gradle.kts index f19fc80..dc451fe 100644 --- a/mmtc-core/build.gradle.kts +++ b/mmtc-core/build.gradle.kts @@ -29,14 +29,14 @@ dependencies { implementation(libs.jakarta.xml) implementation(libs.jaxb.impl) - implementation("commons-beanutils:commons-beanutils:1.11.0") - implementation("org.apache.commons:commons-configuration2:2.12.0") - implementation("com.google.guava:guava:33.4.8-jre") + implementation(libs.commons.beanutils) + implementation(libs.commons.configuration) + implementation(libs.google.guava) - implementation("org.jdbi:jdbi3-core:3.39.1") - implementation("org.jdbi:jdbi3-sqlite:3.39.1") + implementation(libs.jdbi3.core) + implementation(libs.jdbi3.sqlite) implementation(libs.log4j.slf4j) // jdbi3-core uses slf4j-api, and we need to provide it a logging implementation - implementation("org.xerial:sqlite-jdbc:3.50.3.0") + implementation(libs.sqlite.jdbc) implementation(libs.commons.cli) implementation(libs.commons.csv) @@ -54,7 +54,7 @@ dependencies { testImplementation(testlibs.junit.jupiter.params) testImplementation(testlibs.junit.jupiter.engine) testRuntimeOnly(testlibs.junit.platform.launcher) - testImplementation(testlibs.mockito.inline) + testImplementation(testlibs.mockito.core) } description = "mmtc-core" @@ -165,6 +165,16 @@ tasks.build { dependsOn(uberJar) } +tasks.jar { + manifest { + attributes( + "Implementation-Title" to project.name, + "Implementation-Version" to project.version, + "Multi-Release" to "true" + ) + } +} + publishing { publications { create("mmtc-core") { diff --git a/mmtc-output-plugin-sdk/build.gradle.kts b/mmtc-output-plugin-sdk/build.gradle.kts index 832ce8a..cbf142d 100644 --- a/mmtc-output-plugin-sdk/build.gradle.kts +++ b/mmtc-output-plugin-sdk/build.gradle.kts @@ -17,7 +17,7 @@ dependencies { testImplementation(testlibs.junit.jupiter.params) testImplementation(testlibs.junit.jupiter.engine) testRuntimeOnly(testlibs.junit.platform.launcher) - testImplementation(testlibs.mockito.inline) + testImplementation(testlibs.mockito.core) } description = "mmtc-output-plugin-example" diff --git a/mmtc-plugin-ampcs/build.gradle.kts b/mmtc-plugin-ampcs/build.gradle.kts index a9432f3..bd4902f 100644 --- a/mmtc-plugin-ampcs/build.gradle.kts +++ b/mmtc-plugin-ampcs/build.gradle.kts @@ -22,7 +22,7 @@ dependencies { compileOnly(project(":mmtc-core")) - implementation("com.google.guava:guava:33.4.8-jre") + implementation(libs.google.guava) // provides javax.xml.bind classes implementation(libs.jakarta.xml) @@ -44,7 +44,7 @@ dependencies { testImplementation(testlibs.junit.jupiter.params) testImplementation(testlibs.junit.jupiter.engine) testRuntimeOnly(testlibs.junit.platform.launcher) - testImplementation(testlibs.mockito.inline) + testImplementation(testlibs.mockito.core) } description = "mmtc-plugin-ampcs" diff --git a/mmtc-tlm-source-plugin-sdk/build.gradle.kts b/mmtc-tlm-source-plugin-sdk/build.gradle.kts index 3b52a7f..659f79b 100644 --- a/mmtc-tlm-source-plugin-sdk/build.gradle.kts +++ b/mmtc-tlm-source-plugin-sdk/build.gradle.kts @@ -26,7 +26,7 @@ dependencies { testImplementation(testlibs.junit.jupiter.params) testImplementation(testlibs.junit.jupiter.engine) testRuntimeOnly(testlibs.junit.platform.launcher) - testImplementation(testlibs.mockito.inline) + testImplementation(testlibs.mockito.core) } description = "mmtc-tlm-plugin-example" diff --git a/mmtc-webapp/build.gradle.kts b/mmtc-webapp/build.gradle.kts index cc24b4f..4d2c9bb 100644 --- a/mmtc-webapp/build.gradle.kts +++ b/mmtc-webapp/build.gradle.kts @@ -21,8 +21,8 @@ dependencies { ))) implementation(project(":mmtc-core")) - implementation("io.javalin:javalin:6.7.0") - implementation("com.fasterxml.jackson.core:jackson-databind:2.17.2") + implementation(libs.javalin.javalin) + implementation(libs.jackson.databind) implementation(libs.log4j.slf4j) implementation(libs.log4j.api) implementation(libs.log4j.core) diff --git a/settings.gradle.kts b/settings.gradle.kts index 6a66fb8..8e5e12b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -8,7 +8,6 @@ rootProject.name = "mmtc" include(":mmtc-core") include(":mmtc-output-plugin-sdk") include(":mmtc-plugin-ampcs") -include(":mmtc-output-plugin-sdk") include(":mmtc-tlm-source-plugin-sdk") include(":mmtc-webapp") include(":mmtc-webapp-ui") @@ -17,27 +16,52 @@ include(":jnispice") dependencyResolutionManagement { versionCatalogs { create("libs") { - library("commons-csv", "org.apache.commons:commons-csv:1.14.0") - library("commons-lang3", "org.apache.commons:commons-lang3:3.18.0") - library("commons-cli", "commons-cli:commons-cli:1.9.0") - library("commons-io", "commons-io:commons-io:2.19.0") + // comments in this block indicate reasons as to why certain dependencies are not at their latest + + library("commons-csv", "org.apache.commons:commons-csv:1.14.1") + library("commons-lang3", "org.apache.commons:commons-lang3:3.20.0") + library("commons-cli", "commons-cli:commons-cli:1.11.0") + library("commons-io", "commons-io:commons-io:2.22.0") + library("commons-beanutils", "commons-beanutils:commons-beanutils:1.11.0") + library("commons-configuration", "org.apache.commons:commons-configuration2:2.15.0") + + library("google-guava", "com.google.guava:guava:33.6.0-jre") - library("log4j-api", "org.apache.logging.log4j:log4j-api:2.25.1") - library("log4j-core", "org.apache.logging.log4j:log4j-core:2.25.1") - library("log4j-jcl", "org.apache.logging.log4j:log4j-jcl:2.25.1") - library("log4j-slf4j", "org.apache.logging.log4j:log4j-slf4j2-impl:2.25.1") + library("log4j-api", "org.apache.logging.log4j:log4j-api:2.26.0") + library("log4j-core", "org.apache.logging.log4j:log4j-core:2.26.0") + library("log4j-jcl", "org.apache.logging.log4j:log4j-jcl:2.26.0") + library("log4j-slf4j", "org.apache.logging.log4j:log4j-slf4j2-impl:2.26.0") - // provides javax.xml.bind classes + // these provide javax.xml.bind classes + // version 3 is the last to support Java 8 library("jakarta-xml", "jakarta.xml.bind:jakarta.xml.bind-api:3.0.1") library("jaxb-impl", "com.sun.xml.bind:jaxb-impl:3.0.1") + + // this is the last JDBI version to support Java 8 + library("jdbi3-core", "org.jdbi:jdbi3-core:3.39.1") + library("jdbi3-sqlite", "org.jdbi:jdbi3-sqlite:3.39.1") + + // todo update javalin from v6 to v7 + library("javalin-javalin", "io.javalin:javalin:6.7.0") + + // Javalin only supports jackson 2.x currently + library("jackson-databind", "com.fasterxml.jackson.core:jackson-databind:2.21.3") + + // sqlite follows semantic versioning; any 3.x release should maintain backward compatibility + // todo still, write a regression test that uses cached data from MMTC 1.6.0 + library("sqlite-jdbc", "org.xerial:sqlite-jdbc:3.53.1.0") } create("testlibs") { - library("junit-jupiter-api", "org.junit.jupiter:junit-jupiter-api:5.13.4") - library("junit-jupiter-params", "org.junit.jupiter:junit-jupiter-params:5.13.4") - library("junit-jupiter-engine", "org.junit.jupiter:junit-jupiter-engine:5.13.4") - library("junit-platform-launcher", "org.junit.platform:junit-platform-launcher:1.13.4") - library("mockito-inline", "org.mockito:mockito-inline:4.11.0") + // staying with major version 5 for junit-jupiter to maintain similarity with end-to-end-tests + library("junit-jupiter-api", "org.junit.jupiter:junit-jupiter-api:5.14.4") + library("junit-jupiter-params", "org.junit.jupiter:junit-jupiter-params:5.14.4") + library("junit-jupiter-engine", "org.junit.jupiter:junit-jupiter-engine:5.14.4") + + // junit platform launcher v1 works with JUnit 5; newer versions require Java 17+ + library("junit-platform-launcher", "org.junit.platform:junit-platform-launcher:1.14.4") + + library("mockito-core", "org.mockito:mockito-core:5.23.0") } } -} \ No newline at end of file +}