Skip to content

Commit b513d66

Browse files
authored
Update ktor to 3.1.0 to support cross platform builds. (#6)
#5
1 parent d5b1a84 commit b513d66

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

gradle/libs.versions.toml

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
[versions]
22
junit = "4.13.2"
3-
kotlin = "2.0.20"
4-
coroutinest-test = "1.9.0-RC"
5-
ktor = "3.0.0-rc-1"
6-
serialization = "1.6.3"
7-
logback = "1.5.6"
8-
io = "0.5.1"
9-
date-time = "0.6.0"
10-
ksp = "2.0.10-1.0.24"
11-
allopen = "2.0.20"
12-
mokkery = "2.3.0"
13-
kotlinx-resources = "0.9.0"
14-
gradle-publish = "1.2.0"
3+
kotlin = "2.1.10"
4+
coroutinest-test = "1.10.1"
5+
ktor = "3.1.0"
6+
serialization = "1.8.0"
7+
logback = "1.5.16"
8+
io = "0.6.0"
9+
date-time = "0.6.2"
10+
ksp = "2.1.10-1.0.30"
11+
allopen = "2.1.0"
12+
mokkery = "2.6.1"
13+
kotlinx-resources = "0.10.0"
14+
gradle-publish = "1.3.0"
1515
trueangle-lambda = "0.0.1"
1616

1717
[libraries]

lambda-runtime/src/commonMain/kotlin/io/github/trueangle/knative/lambda/runtime/log/JsonLogFormatter.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import io.github.trueangle.knative.lambda.runtime.asSerialObject
66
import io.ktor.util.reflect.TypeInfo
77
import kotlinx.datetime.Clock
88
import kotlinx.serialization.SerializationException
9-
import kotlinx.serialization.encodeToString
109
import kotlinx.serialization.json.Json
1110
import kotlinx.serialization.serializer
1211

@@ -28,7 +27,9 @@ internal class JsonLogFormatter(
2827
)
2928
)
3029
} else {
31-
val messageSerializer = serializer(messageType.reifiedType)
30+
val messageSerializer = serializer(
31+
messageType.kotlinType ?: throw SerializationException("Missing KType")
32+
)
3233
val dtoSerializer = LogMessageDto.serializer(messageSerializer)
3334

3435
json.encodeToString(

0 commit comments

Comments
 (0)