Skip to content

Commit

Permalink
Update Kotlin language version
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Frank committed Sep 29, 2023
1 parent d338eb5 commit fac072c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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()
)
)
Expand Down
4 changes: 2 additions & 2 deletions cli/src/jvmMain/kotlin/org/islandoftex/arara/cli/CLI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fac072c

Please sign in to comment.