diff options
author | Joffrey Bion <joffrey.bion@gmail.com> | 2021-09-07 00:30:02 +0200 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@gmail.com> | 2021-09-07 02:41:42 +0200 |
commit | 0ab3594568c36f64df480cfaccd9e7f7692bfb10 (patch) | |
tree | ce9ca956a51c768a18f3ab1c4053fe15ac359d86 /sw-common-model | |
parent | Use JDK 15 because of Gradle issue on 16 (diff) | |
download | seven-wonders-0ab3594568c36f64df480cfaccd9e7f7692bfb10.tar.gz seven-wonders-0ab3594568c36f64df480cfaccd9e7f7692bfb10.tar.bz2 seven-wonders-0ab3594568c36f64df480cfaccd9e7f7692bfb10.zip |
Upgrade Kotlin, Kotlin/React, and Krossbow versions
Diffstat (limited to 'sw-common-model')
3 files changed, 5 insertions, 5 deletions
diff --git a/sw-common-model/build.gradle.kts b/sw-common-model/build.gradle.kts index fd5b8848..557a6d04 100644 --- a/sw-common-model/build.gradle.kts +++ b/sw-common-model/build.gradle.kts @@ -10,8 +10,8 @@ kotlin { } sourceSets { all { - languageSettings.useExperimentalAnnotation("kotlin.RequiresOptIn") - languageSettings.useExperimentalAnnotation("kotlin.time.ExperimentalTime") + languageSettings.optIn("kotlin.RequiresOptIn") + languageSettings.optIn("kotlin.time.ExperimentalTime") } val commonMain by getting { dependencies { diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/actions/Actions.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/actions/Actions.kt index 7b9a3d60..4e877737 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/actions/Actions.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/actions/Actions.kt @@ -4,7 +4,7 @@ import kotlinx.serialization.Serializable import org.luxons.sevenwonders.model.PlayerMove import org.luxons.sevenwonders.model.Settings import org.luxons.sevenwonders.model.wonders.AssignedWonder -import kotlin.time.hours +import kotlin.time.Duration /** * The action to choose the player's name. This is the first action that should be called. @@ -110,7 +110,7 @@ class AddBotAction( /** * The global timeout for the bot, after which it disconnects (whether the game is over or not). */ - val globalBotTimeoutMillis: Long = 6.hours.toLongMilliseconds(), + val globalBotTimeoutMillis: Long = Duration.hours(6).inWholeMilliseconds, /** * The configuration of the bot to add. */ diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/resources/Resources.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/resources/Resources.kt index 384de2d4..d8343fb8 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/resources/Resources.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/resources/Resources.kt @@ -63,7 +63,7 @@ typealias PricedResourceTransactions = Set<PricedResourceTransaction> typealias ResourceTransactionOptions = List<PricedResourceTransactions> val PricedResourceTransactions.totalPrice: Int - get() = sumBy { it.totalPrice } + get() = sumOf { it.totalPrice } val ResourceTransactionOptions.bestPrice: Int get() = minOfOrNull { it.totalPrice } ?: Int.MAX_VALUE |