Skip to content

Commit

Permalink
update to kotlin 2.0.20
Browse files Browse the repository at this point in the history
  • Loading branch information
benediktschwab committed Sep 22, 2024
1 parent fd18146 commit 6add55f
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 30 deletions.
26 changes: 13 additions & 13 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/Plugins.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -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/.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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 ##########################################################################
Expand Down
1 change: 1 addition & 0 deletions rtron-cli/src/main/kotlin/io/rtron/cli/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -50,13 +57,13 @@ class OpendriveUnmarshaller(val opendriveVersion: OpendriveVersion) {
companion object {
private val OPENDRIVE_MODEL_CLASSES: Map<OpendriveVersion, Class<out Any>> =
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<OpendriveVersion, String> =
mapOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ 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
val supportedVersion: OpendriveVersion = OpendriveVersion.V1_7
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)
Expand Down

0 comments on commit 6add55f

Please sign in to comment.