diff --git a/build.gradle.kts b/build.gradle.kts index 27e673222..1953ff732 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -180,8 +180,8 @@ subprojects { sourceSets { all { languageSettings.apply { - languageVersion = "1.5" - apiVersion = "1.5" + languageVersion = "1.9" + apiVersion = "1.9" } } val commonMain by getting { diff --git a/cli/src/commonMain/kotlin/org/islandoftex/arara/cli/utils/DisplayUtils.kt b/cli/src/commonMain/kotlin/org/islandoftex/arara/cli/utils/DisplayUtils.kt index dff09221f..00c758003 100644 --- a/cli/src/commonMain/kotlin/org/islandoftex/arara/cli/utils/DisplayUtils.kt +++ b/cli/src/commonMain/kotlin/org/islandoftex/arara/cli/utils/DisplayUtils.kt @@ -13,7 +13,7 @@ import org.islandoftex.arara.core.session.Session import org.islandoftex.arara.core.utils.formatString import kotlin.math.ln import kotlin.math.pow -import kotlin.time.Duration +import kotlin.time.Duration.Companion.seconds /** * Implements display utilitary methods. @@ -323,14 +323,14 @@ object DisplayUtils { if (displayLine || displayException) println() - val secondDuration = Duration.seconds(seconds) + val secondDuration = seconds.seconds val text = LanguageController.messages.INFO_DISPLAY_EXECUTION_TIME .formatString( "%s%s%s".formatString( secondDuration.inWholeSeconds.toString(), Session.userInterfaceOptions.locale .decimalSeparator.toString(), - (secondDuration - Duration.seconds(secondDuration.inWholeSeconds)) + (secondDuration - secondDuration.inWholeSeconds.seconds) .inWholeMilliseconds.toString() ) ) diff --git a/cli/src/jvmMain/kotlin/org/islandoftex/arara/cli/CLI.kt b/cli/src/jvmMain/kotlin/org/islandoftex/arara/cli/CLI.kt index 8dd565cce..aeb796167 100644 --- a/cli/src/jvmMain/kotlin/org/islandoftex/arara/cli/CLI.kt +++ b/cli/src/jvmMain/kotlin/org/islandoftex/arara/cli/CLI.kt @@ -44,7 +44,7 @@ import org.islandoftex.arara.core.session.Session import org.islandoftex.arara.lua.LuaInterpreter import org.islandoftex.arara.mvel.utils.MvelState import java.time.LocalDate -import kotlin.time.Duration +import kotlin.time.Duration.Companion.milliseconds import kotlin.time.DurationUnit import kotlin.time.TimeSource @@ -199,7 +199,7 @@ class CLI : CliktCommand( .copy( maxLoops = maxLoops ?: LinearExecutor.executionOptions.maxLoops, - timeoutValue = timeout?.let { Duration.milliseconds(it) } + timeoutValue = timeout?.let { it.milliseconds } ?: LinearExecutor.executionOptions.timeoutValue, verbose = if (verbose) true