diff --git a/build.gradle.kts b/build.gradle.kts index 5781be9..48f8434 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ val kotest_version: String by project plugins { kotlin("jvm") version "2.1.10" - id("io.ktor.plugin") version "2.3.8" + id("io.ktor.plugin") version "2.3.13" id("org.jetbrains.kotlin.plugin.serialization") version "2.1.10" id("org.jlleitschuh.gradle.ktlint") version "12.2.0" } @@ -62,8 +62,10 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:$kotlin_serialization_version") implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2") - testImplementation("io.kotest:kotest-extensions-koin:6.0.0.M2") - testImplementation("io.ktor:ktor-server-tests-jvm") + // Force version of sub library (for security) + implementation("commons-codec:commons-codec:1.13") + + testImplementation("io.kotest:kotest-extensions-koin:$kotest_version") testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version") testImplementation("io.ktor:ktor-server-test-host-jvm:2.3.11") testImplementation("io.kotest:kotest-runner-junit5:$kotest_version") diff --git a/gradle.properties b/gradle.properties index 8aa2f04..6bf0b33 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,11 +1,9 @@ -ktor_version=3.0.3 +ktor_version=3.1.1 kotlin_version=2.1.10 kotlin_serialization_version=1.8.0 -logback_version=1.5.16 +logback_version=1.5.17 koin_version=4.0.2 -kotlin_logging_version=5.1.0 -#kotlin_logging_version=7.0.4 -kotest_version=5.9.1 -#kotest_version=6.0.0 +kotlin_logging_version=7.0.5 +kotest_version=6.0.0.M2 kotlin.code.style=official diff --git a/src/main/kotlin/eventDemo/app/entity/Player.kt b/src/main/kotlin/eventDemo/app/entity/Player.kt index f5f65ee..43b13c6 100644 --- a/src/main/kotlin/eventDemo/app/entity/Player.kt +++ b/src/main/kotlin/eventDemo/app/entity/Player.kt @@ -3,7 +3,6 @@ package eventDemo.app.entity import eventDemo.configuration.PlayerIdSerializer import eventDemo.configuration.UUIDSerializer import eventDemo.libs.event.AggregateId -import io.ktor.server.auth.Principal import kotlinx.serialization.Serializable import java.util.UUID @@ -12,7 +11,7 @@ data class Player( val name: String, @Serializable(with = PlayerIdSerializer::class) val id: PlayerId = PlayerId(UUID.randomUUID()), -) : Principal { +) { constructor(id: String, name: String) : this( name, PlayerId(UUID.fromString(id)),