diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index 6b3b932..d42a563 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -17,8 +17,8 @@ object DependencyVersions { // standard libraries - const val kotlin = "1.9.24" - const val coroutines = "1.8.1" + const val kotlin = "2.0.20" + const val coroutines = "1.9.0" const val arrow = "1.2.4" // testing libraries @@ -28,32 +28,32 @@ object DependencyVersions { // logging libraries const val kotlinLogging = "7.0.0" - const val slf4jSimple = "2.0.13" + const val slf4jSimple = "2.0.16" // object creation libraries - const val kotlinxSerializationJson = "1.6.3" - const val kaml = "0.59.0" + const val kotlinxSerializationJson = "1.7.3" + const val kaml = "0.61.0" const val jakartaActivationApi = "2.1.3" const val jakartaXmlBindApi = "4.0.2" const val jaxb = "4.0.5" // object mapping libraries - const val mapstruct = "1.5.5.Final" + const val mapstruct = "1.6.2" // io libraries - const val clikt = "4.4.0" + const val clikt = "5.0.0" const val mordant = "1.2.1" - const val commonsIO = "2.16.1" + const val commonsIO = "2.17.0" const val commonsCSV = "1.11.0" - const val commonsLang = "3.15.0" - const val commonsCompress = "1.26.2" - const val zstdJni = "1.5.6-4" + const val commonsLang = "3.17.0" + const val commonsCompress = "1.27.1" + const val zstdJni = "1.5.6-5" const val emojiJava = "5.1.1" // math libraries - const val guava = "33.2.1-jre" + const val guava = "33.3.0-jre" const val commonsMath = "3.6.1" - const val joml = "1.10.7" + const val joml = "1.10.8" const val poly2tri = "0.1.2" // geo libraries diff --git a/buildSrc/src/main/kotlin/Plugins.kt b/buildSrc/src/main/kotlin/Plugins.kt index 6ecc123..e0f9d6c 100644 --- a/buildSrc/src/main/kotlin/Plugins.kt +++ b/buildSrc/src/main/kotlin/Plugins.kt @@ -21,8 +21,8 @@ object PluginVersions { const val xjc = "1.6" const val versionChecker = "0.51.0" const val dokka = "1.9.20" - const val serialization = "1.9.24" - const val ksp = "1.9.24-1.0.20" + const val serialization = "2.0.20" + const val ksp = "2.0.20-1.0.25" } object Plugins { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e644113..2c35211 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 09523c0..0aaefbc 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.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 1aa94a4..f5feea6 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/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/gradlew.bat b/gradlew.bat index 25da30d..9d21a21 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 ########################################################################## diff --git a/rtron-cli/src/main/kotlin/io/rtron/cli/Main.kt b/rtron-cli/src/main/kotlin/io/rtron/cli/Main.kt index 371a18d..03e22e7 100644 --- a/rtron-cli/src/main/kotlin/io/rtron/cli/Main.kt +++ b/rtron-cli/src/main/kotlin/io/rtron/cli/Main.kt @@ -19,6 +19,7 @@ package io.rtron.cli import com.github.ajalt.clikt.core.CliktCommand +import com.github.ajalt.clikt.core.main import com.github.ajalt.clikt.core.subcommands import com.github.ajalt.clikt.parameters.options.versionOption diff --git a/rtron-cli/src/main/kotlin/io/rtron/cli/SubcommandOpendriveToCitygml.kt b/rtron-cli/src/main/kotlin/io/rtron/cli/SubcommandOpendriveToCitygml.kt index 9c7a87f..c09fdac 100644 --- a/rtron-cli/src/main/kotlin/io/rtron/cli/SubcommandOpendriveToCitygml.kt +++ b/rtron-cli/src/main/kotlin/io/rtron/cli/SubcommandOpendriveToCitygml.kt @@ -19,6 +19,7 @@ package io.rtron.cli import arrow.core.toOption import com.charleskorn.kaml.Yaml import com.github.ajalt.clikt.core.CliktCommand +import com.github.ajalt.clikt.core.Context import com.github.ajalt.clikt.parameters.arguments.argument import com.github.ajalt.clikt.parameters.options.default import com.github.ajalt.clikt.parameters.options.flag @@ -42,10 +43,10 @@ import io.rtron.transformer.modifiers.opendrive.offset.adder.OpendriveOffsetAdde class SubcommandOpendriveToCitygml : CliktCommand( name = "opendrive-to-citygml", - help = "Transform OpenDRIVE datasets to CityGML.", - printHelpOnEmptyArgs = true, ) { // Properties and Initializers + override val printHelpOnEmptyArgs = true + private val parametersPath by option( help = "Path to a YAML file containing the parameters of the process.", ).path(mustExist = true) @@ -114,6 +115,7 @@ class SubcommandOpendriveToCitygml : CliktCommand( .default(CompressionFormat.NONE) // Methods + override fun help(context: Context) = "Transform OpenDRIVE datasets to CityGML" override fun run() { val parameters = diff --git a/rtron-cli/src/main/kotlin/io/rtron/cli/SubcommandValidateOpendrive.kt b/rtron-cli/src/main/kotlin/io/rtron/cli/SubcommandValidateOpendrive.kt index f7c1ce7..4cbc07d 100644 --- a/rtron-cli/src/main/kotlin/io/rtron/cli/SubcommandValidateOpendrive.kt +++ b/rtron-cli/src/main/kotlin/io/rtron/cli/SubcommandValidateOpendrive.kt @@ -19,6 +19,7 @@ package io.rtron.cli import arrow.core.toOption import com.charleskorn.kaml.Yaml import com.github.ajalt.clikt.core.CliktCommand +import com.github.ajalt.clikt.core.Context import com.github.ajalt.clikt.parameters.arguments.argument import com.github.ajalt.clikt.parameters.options.default import com.github.ajalt.clikt.parameters.options.flag @@ -35,10 +36,10 @@ import io.rtron.transformer.evaluator.opendrive.OpendriveEvaluatorParameters class SubcommandValidateOpendrive : CliktCommand( name = "validate-opendrive", - help = "Validate OpenDRIVE datasets.", - printHelpOnEmptyArgs = true, ) { // Properties and Initializers + override val printHelpOnEmptyArgs = true + private val parametersPath by option( help = "Path to a YAML file containing the parameters of the process.", ).path(mustExist = true) @@ -81,6 +82,8 @@ class SubcommandValidateOpendrive : CliktCommand( .default(CompressionFormat.NONE) // Methods + override fun help(context: Context) = "Validate OpenDRIVE datasets" + override fun run() { val parameters = parametersPath.toOption().fold({ diff --git a/rtron-readerwriter/src/main/kotlin/io/rtron/readerwriter/opendrive/reader/OpendriveUnmarshaller.kt b/rtron-readerwriter/src/main/kotlin/io/rtron/readerwriter/opendrive/reader/OpendriveUnmarshaller.kt index c2e36ad..735fde0 100644 --- a/rtron-readerwriter/src/main/kotlin/io/rtron/readerwriter/opendrive/reader/OpendriveUnmarshaller.kt +++ b/rtron-readerwriter/src/main/kotlin/io/rtron/readerwriter/opendrive/reader/OpendriveUnmarshaller.kt @@ -26,6 +26,13 @@ import jakarta.xml.bind.JAXBContext import jakarta.xml.bind.Unmarshaller import javax.xml.XMLConstants import javax.xml.validation.SchemaFactory +import org.asam.opendrive11.OpenDRIVE as Opendrive11 +import org.asam.opendrive12.OpenDRIVE as Opendrive12 +import org.asam.opendrive13.OpenDRIVE as Opendrive13 +import org.asam.opendrive14.OpenDRIVE as Opendrive14 +import org.asam.opendrive15.OpenDRIVE as Opendrive15 +import org.asam.opendrive16.OpenDRIVE as Opendrive16 +import org.asam.opendrive17.OpenDRIVE as Opendrive17 class OpendriveUnmarshaller(val opendriveVersion: OpendriveVersion) { // Properties and Initializers @@ -50,13 +57,13 @@ class OpendriveUnmarshaller(val opendriveVersion: OpendriveVersion) { companion object { private val OPENDRIVE_MODEL_CLASSES: Map> = mapOf( - OpendriveVersion.V1_1 to org.asam.opendrive11.OpenDRIVE::class.java, - OpendriveVersion.V1_2 to org.asam.opendrive12.OpenDRIVE::class.java, - OpendriveVersion.V1_3 to org.asam.opendrive13.OpenDRIVE::class.java, - OpendriveVersion.V1_4 to org.asam.opendrive14.OpenDRIVE::class.java, - OpendriveVersion.V1_5 to org.asam.opendrive15.OpenDRIVE::class.java, - OpendriveVersion.V1_6 to org.asam.opendrive16.OpenDRIVE::class.java, - OpendriveVersion.V1_7 to org.asam.opendrive17.OpenDRIVE::class.java, + OpendriveVersion.V1_1 to Opendrive11::class.java, + OpendriveVersion.V1_2 to Opendrive12::class.java, + OpendriveVersion.V1_3 to Opendrive13::class.java, + OpendriveVersion.V1_4 to Opendrive14::class.java, + OpendriveVersion.V1_5 to Opendrive15::class.java, + OpendriveVersion.V1_6 to Opendrive16::class.java, + OpendriveVersion.V1_7 to Opendrive17::class.java, ) private val OPENDRIVE_SCHEMA_LOCATIONS: Map = mapOf( diff --git a/rtron-readerwriter/src/main/kotlin/io/rtron/readerwriter/opendrive/writer/OpendriveMarshaller.kt b/rtron-readerwriter/src/main/kotlin/io/rtron/readerwriter/opendrive/writer/OpendriveMarshaller.kt index 2eafb72..5af30aa 100644 --- a/rtron-readerwriter/src/main/kotlin/io/rtron/readerwriter/opendrive/writer/OpendriveMarshaller.kt +++ b/rtron-readerwriter/src/main/kotlin/io/rtron/readerwriter/opendrive/writer/OpendriveMarshaller.kt @@ -24,6 +24,7 @@ import jakarta.xml.bind.Marshaller import org.mapstruct.factory.Mappers import java.io.OutputStream import kotlin.io.path.div +import org.asam.opendrive17.OpenDRIVE as Opendrive17 class OpendriveMarshaller { // Properties and Initializers @@ -31,7 +32,7 @@ class OpendriveMarshaller { private val jaxbMarshaller: Marshaller init { - val jaxbContext = JAXBContext.newInstance(org.asam.opendrive17.OpenDRIVE::class.java) + val jaxbContext = JAXBContext.newInstance(Opendrive17::class.java) jaxbMarshaller = jaxbContext.createMarshaller() jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true)