Update kotlin to v2.3.21 (#1991)

* Update kotlin to v2.3.21

* Context Parameters

* Use new format

* Lint

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Syer10 <syer10@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2026-05-09 11:41:27 -04:00
committed by GitHub
parent 72122b7cbf
commit ec28794655
3 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ subprojects {
}
compilerOptions {
jvmTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
freeCompilerArgs.add("-Xcontext-receivers")
freeCompilerArgs.add("-Xcontext-parameters")
}
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
[versions]
kotlin = "2.3.10"
kotlin = "2.3.21"
coroutines = "1.10.2"
serialization = "1.10.0"
jvmTarget = "21"
@@ -140,17 +140,16 @@ fun OkHttpClient.newCachelessCallWithProgress(
return progressClient.newCall(request)
}
context(Json)
context(_: Json)
inline fun <reified T> Response.parseAs(): T = decodeFromJsonResponse(serializer(), this)
@OptIn(ExperimentalSerializationApi::class)
context(Json)
context(json: Json)
fun <T> decodeFromJsonResponse(
deserializer: DeserializationStrategy<T>,
response: Response,
): T =
response.body.source().use {
decodeFromBufferedSource(deserializer, it)
json.decodeFromBufferedSource(deserializer, it)
}
class HttpException(