From f4560b87dabb217ee2bbf7d0ce5186d1253db782 Mon Sep 17 00:00:00 2001 From: Aleksei Tirman Date: Thu, 29 Jun 2023 12:08:20 +0300 Subject: [PATCH] KTOR-6059 Bump Ktor to 2.3.2 (#175) * KTOR-6059 Bump Ktor to 2.3.2 * KTOR-6059 Update Kotlin version * KTOR-6059 Fix YouKube test by updating cookies only when Set-Cookie header is received --- chat/build.gradle | 4 ++-- client-mpp/shared/build.gradle | 2 +- client-multipart/build.gradle | 2 +- client-tools/build.gradle | 2 +- di-kodein/build.gradle.kts | 6 +++--- di-kodein/gradle.properties | 2 +- filelisting/build.gradle.kts | 4 ++-- filelisting/gradle.properties | 2 +- fullstack-mpp/build.gradle | 4 ++-- graalvm/build.gradle.kts | 2 +- h2/build.gradle.kts | 2 +- httpbin/build.gradle.kts | 4 ++-- httpbin/gradle.properties | 2 +- jwt-auth-tests/build.gradle.kts | 6 +++--- kweet/build.gradle.kts | 6 +++--- kweet/gradle.properties | 2 +- location-header/build.gradle.kts | 4 ++-- location-header/gradle.properties | 2 +- maven-google-appengine-standard/pom.xml | 2 +- mongodb/build.gradle.kts | 8 ++++---- mongodb/gradle.properties | 2 +- postgres/build.gradle.kts | 4 ++-- postgres/gradle.properties | 2 +- redirect-with-exception/build.gradle.kts | 4 ++-- redirect-with-exception/gradle.properties | 2 +- reverse-proxy-ws/build.gradle.kts | 4 ++-- reverse-proxy-ws/gradle.properties | 2 +- reverse-proxy/build.gradle.kts | 4 ++-- reverse-proxy/gradle.properties | 2 +- rx/build.gradle.kts | 4 ++-- rx/gradle.properties | 2 +- sse/build.gradle.kts | 4 ++-- sse/gradle.properties | 2 +- structured-logging/build.gradle.kts | 4 ++-- structured-logging/gradle.properties | 2 +- version-diff/build.gradle.kts | 6 +++--- version-diff/gradle.properties | 2 +- youkube/build.gradle.kts | 6 +++--- youkube/gradle.properties | 2 +- youkube/src/test/kotlin/YoukubeApplicationTestLegacy.kt | 5 ++++- 40 files changed, 68 insertions(+), 65 deletions(-) diff --git a/chat/build.gradle b/chat/build.gradle index b10cc062..2fb02636 100644 --- a/chat/build.gradle +++ b/chat/build.gradle @@ -3,7 +3,7 @@ buildscript { mavenCentral() } dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22" } } @@ -33,7 +33,7 @@ kotlin { sourceSets.each { it.dependencies { - implementation(project.dependencies.enforcedPlatform("io.ktor:ktor-bom:2.3.1")) + implementation(project.dependencies.enforcedPlatform("io.ktor:ktor-bom:2.3.2")) } } diff --git a/client-mpp/shared/build.gradle b/client-mpp/shared/build.gradle index 59fc2a31..8d784600 100644 --- a/client-mpp/shared/build.gradle +++ b/client-mpp/shared/build.gradle @@ -19,7 +19,7 @@ kotlin { sourceSets.each { it.dependencies { - implementation(project.dependencies.enforcedPlatform("io.ktor:ktor-bom:2.3.1")) + implementation(project.dependencies.enforcedPlatform("io.ktor:ktor-bom:2.3.2")) } } diff --git a/client-multipart/build.gradle b/client-multipart/build.gradle index b620575e..bdecddfd 100644 --- a/client-multipart/build.gradle +++ b/client-multipart/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20" - classpath "io.ktor.plugin:plugin:2.3.1" + classpath "io.ktor.plugin:plugin:2.3.2" } } diff --git a/client-tools/build.gradle b/client-tools/build.gradle index 2bb2307e..d5ecf125 100644 --- a/client-tools/build.gradle +++ b/client-tools/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20" - classpath "io.ktor.plugin:plugin:2.3.1" + classpath "io.ktor.plugin:plugin:2.3.2" } } diff --git a/di-kodein/build.gradle.kts b/di-kodein/build.gradle.kts index 49bf0553..0d5ba818 100644 --- a/di-kodein/build.gradle.kts +++ b/di-kodein/build.gradle.kts @@ -2,9 +2,9 @@ val kotlin_version: String by project val logback_version: String by project plugins { - kotlin("jvm") version "1.8.0" - id("io.ktor.plugin") version "2.3.1" - kotlin("plugin.serialization") version "1.8.0" + kotlin("jvm") version "1.8.22" + id("io.ktor.plugin") version "2.3.2" + kotlin("plugin.serialization") version "1.8.22" } application { diff --git a/di-kodein/gradle.properties b/di-kodein/gradle.properties index 26ec6bba..43d1baaf 100644 --- a/di-kodein/gradle.properties +++ b/di-kodein/gradle.properties @@ -1,3 +1,3 @@ -kotlin_version=1.8.0 +kotlin_version=1.8.22 logback_version=1.2.11 kotlin.code.style=official diff --git a/filelisting/build.gradle.kts b/filelisting/build.gradle.kts index 19e87f82..ba52a0fe 100644 --- a/filelisting/build.gradle.kts +++ b/filelisting/build.gradle.kts @@ -2,8 +2,8 @@ val kotlin_version: String by project val logback_version: String by project plugins { - kotlin("jvm") version "1.8.0" - id("io.ktor.plugin") version "2.3.1" + kotlin("jvm") version "1.8.22" + id("io.ktor.plugin") version "2.3.2" } application { diff --git a/filelisting/gradle.properties b/filelisting/gradle.properties index 26ec6bba..43d1baaf 100644 --- a/filelisting/gradle.properties +++ b/filelisting/gradle.properties @@ -1,3 +1,3 @@ -kotlin_version=1.8.0 +kotlin_version=1.8.22 logback_version=1.2.11 kotlin.code.style=official diff --git a/fullstack-mpp/build.gradle b/fullstack-mpp/build.gradle index 16d05fa5..69357010 100644 --- a/fullstack-mpp/build.gradle +++ b/fullstack-mpp/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22" } } @@ -29,7 +29,7 @@ kotlin { sourceSets.each { it.dependencies { - implementation(project.dependencies.enforcedPlatform("io.ktor:ktor-bom:2.3.1")) + implementation(project.dependencies.enforcedPlatform("io.ktor:ktor-bom:2.3.2")) } } diff --git a/graalvm/build.gradle.kts b/graalvm/build.gradle.kts index 2b006dbd..b530b3ab 100644 --- a/graalvm/build.gradle.kts +++ b/graalvm/build.gradle.kts @@ -1,7 +1,7 @@ plugins { application kotlin("jvm") version "1.7.20" - id("io.ktor.plugin") version "2.3.1" + id("io.ktor.plugin") version "2.3.2" id("org.graalvm.buildtools.native") version "0.9.11" } diff --git a/h2/build.gradle.kts b/h2/build.gradle.kts index 95975605..77619928 100644 --- a/h2/build.gradle.kts +++ b/h2/build.gradle.kts @@ -4,7 +4,7 @@ val logback_version: String by project plugins { application kotlin("jvm") version "1.7.20" - id("io.ktor.plugin") version "2.3.1" + id("io.ktor.plugin") version "2.3.2" } group = "io.ktor.samples" diff --git a/httpbin/build.gradle.kts b/httpbin/build.gradle.kts index 1ae857cd..5d0b77c6 100644 --- a/httpbin/build.gradle.kts +++ b/httpbin/build.gradle.kts @@ -2,8 +2,8 @@ val kotlin_version: String by project val logback_version: String by project plugins { - kotlin("jvm") version "1.8.0" - id("io.ktor.plugin") version "2.3.1" + kotlin("jvm") version "1.8.22" + id("io.ktor.plugin") version "2.3.2" } application { diff --git a/httpbin/gradle.properties b/httpbin/gradle.properties index dc54fd4e..9e97abd7 100644 --- a/httpbin/gradle.properties +++ b/httpbin/gradle.properties @@ -1,4 +1,4 @@ -kotlin_version=1.8.0 +kotlin_version=1.8.22 logback_version=1.2.11 kotlin.code.style=official diff --git a/jwt-auth-tests/build.gradle.kts b/jwt-auth-tests/build.gradle.kts index 25908efb..7cf0b844 100644 --- a/jwt-auth-tests/build.gradle.kts +++ b/jwt-auth-tests/build.gradle.kts @@ -1,7 +1,7 @@ plugins { - kotlin("jvm") version "1.8.10" - kotlin("plugin.serialization") version "1.8.10" - id("io.ktor.plugin") version "2.3.1" + kotlin("jvm") version "1.8.22" + kotlin("plugin.serialization") version "1.8.22" + id("io.ktor.plugin") version "2.3.2" } application { diff --git a/kweet/build.gradle.kts b/kweet/build.gradle.kts index 41a9f0c1..ec6e7458 100644 --- a/kweet/build.gradle.kts +++ b/kweet/build.gradle.kts @@ -3,9 +3,9 @@ val logback_version: String by project val exposed_version: String by project plugins { - kotlin("jvm") version "1.8.0" - id("io.ktor.plugin") version "2.3.1" - kotlin("plugin.serialization") version "1.8.0" + kotlin("jvm") version "1.8.22" + id("io.ktor.plugin") version "2.3.2" + kotlin("plugin.serialization") version "1.8.22" } application { diff --git a/kweet/gradle.properties b/kweet/gradle.properties index 2bfacd90..e3f4faf0 100644 --- a/kweet/gradle.properties +++ b/kweet/gradle.properties @@ -1,4 +1,4 @@ -kotlin_version=1.8.0 +kotlin_version=1.8.22 logback_version=1.2.11 exposed_version=0.40.1 kotlin.code.style=official diff --git a/location-header/build.gradle.kts b/location-header/build.gradle.kts index 8c1645c7..2524bbd6 100644 --- a/location-header/build.gradle.kts +++ b/location-header/build.gradle.kts @@ -2,8 +2,8 @@ val kotlin_version: String by project val logback_version: String by project plugins { - kotlin("jvm") version "1.8.0" - id("io.ktor.plugin") version "2.3.1" + kotlin("jvm") version "1.8.22" + id("io.ktor.plugin") version "2.3.2" } application { diff --git a/location-header/gradle.properties b/location-header/gradle.properties index 26ec6bba..43d1baaf 100644 --- a/location-header/gradle.properties +++ b/location-header/gradle.properties @@ -1,3 +1,3 @@ -kotlin_version=1.8.0 +kotlin_version=1.8.22 logback_version=1.2.11 kotlin.code.style=official diff --git a/maven-google-appengine-standard/pom.xml b/maven-google-appengine-standard/pom.xml index bbc104c4..5c3b44ce 100644 --- a/maven-google-appengine-standard/pom.xml +++ b/maven-google-appengine-standard/pom.xml @@ -37,7 +37,7 @@ io.ktor ktor-bom - 2.3.1 + 2.3.2 pom import diff --git a/mongodb/build.gradle.kts b/mongodb/build.gradle.kts index 92fe1074..06f07d49 100644 --- a/mongodb/build.gradle.kts +++ b/mongodb/build.gradle.kts @@ -3,9 +3,9 @@ val logback_version: String by project val mongodb_version: String by project plugins { - kotlin("jvm") version "1.8.10" - id("io.ktor.plugin") version "2.3.1" - id("org.jetbrains.kotlin.plugin.serialization") version "1.8.10" + kotlin("jvm") version "1.8.22" + id("io.ktor.plugin") version "2.3.2" + id("org.jetbrains.kotlin.plugin.serialization") version "1.8.22" } group = "com.example" @@ -32,7 +32,7 @@ dependencies { implementation("org.litote.kmongo:kmongo:$mongodb_version") testImplementation("io.ktor:ktor-server-tests-jvm") testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version") - testImplementation("io.ktor:ktor-server-test-host-jvm:2.3.1") + testImplementation("io.ktor:ktor-server-test-host-jvm:2.3.2") } tasks.register("databaseInstance") { diff --git a/mongodb/gradle.properties b/mongodb/gradle.properties index aef90155..043c80d5 100644 --- a/mongodb/gradle.properties +++ b/mongodb/gradle.properties @@ -1,4 +1,4 @@ -kotlin_version=1.8.10 +kotlin_version=1.8.22 logback_version=1.2.11 mongodb_version=4.8.0 kotlin.code.style=official diff --git a/postgres/build.gradle.kts b/postgres/build.gradle.kts index 4e1807ee..3dad7111 100644 --- a/postgres/build.gradle.kts +++ b/postgres/build.gradle.kts @@ -2,9 +2,9 @@ val kotlin_version: String by project val logback_version: String by project plugins { - kotlin("jvm") version "1.8.10" + kotlin("jvm") version "1.8.22" id("io.ktor.plugin") version "2.2.3" - id("org.jetbrains.kotlin.plugin.serialization") version "1.8.10" + id("org.jetbrains.kotlin.plugin.serialization") version "1.8.22" } group = "com.example" diff --git a/postgres/gradle.properties b/postgres/gradle.properties index 97175db1..43d1baaf 100644 --- a/postgres/gradle.properties +++ b/postgres/gradle.properties @@ -1,3 +1,3 @@ -kotlin_version=1.8.10 +kotlin_version=1.8.22 logback_version=1.2.11 kotlin.code.style=official diff --git a/redirect-with-exception/build.gradle.kts b/redirect-with-exception/build.gradle.kts index ac12f062..557405b4 100644 --- a/redirect-with-exception/build.gradle.kts +++ b/redirect-with-exception/build.gradle.kts @@ -2,8 +2,8 @@ val kotlin_version: String by project val logback_version: String by project plugins { - kotlin("jvm") version "1.8.0" - id("io.ktor.plugin") version "2.3.1" + kotlin("jvm") version "1.8.22" + id("io.ktor.plugin") version "2.3.2" } application { diff --git a/redirect-with-exception/gradle.properties b/redirect-with-exception/gradle.properties index 26ec6bba..43d1baaf 100644 --- a/redirect-with-exception/gradle.properties +++ b/redirect-with-exception/gradle.properties @@ -1,3 +1,3 @@ -kotlin_version=1.8.0 +kotlin_version=1.8.22 logback_version=1.2.11 kotlin.code.style=official diff --git a/reverse-proxy-ws/build.gradle.kts b/reverse-proxy-ws/build.gradle.kts index 8ec27cc7..e602d93c 100644 --- a/reverse-proxy-ws/build.gradle.kts +++ b/reverse-proxy-ws/build.gradle.kts @@ -2,8 +2,8 @@ val kotlin_version: String by project val logback_version: String by project plugins { - kotlin("jvm") version "1.8.0" - id("io.ktor.plugin") version "2.3.1" + kotlin("jvm") version "1.8.22" + id("io.ktor.plugin") version "2.3.2" } application { diff --git a/reverse-proxy-ws/gradle.properties b/reverse-proxy-ws/gradle.properties index 26ec6bba..43d1baaf 100644 --- a/reverse-proxy-ws/gradle.properties +++ b/reverse-proxy-ws/gradle.properties @@ -1,3 +1,3 @@ -kotlin_version=1.8.0 +kotlin_version=1.8.22 logback_version=1.2.11 kotlin.code.style=official diff --git a/reverse-proxy/build.gradle.kts b/reverse-proxy/build.gradle.kts index 9bbe0af3..0ed0e3aa 100644 --- a/reverse-proxy/build.gradle.kts +++ b/reverse-proxy/build.gradle.kts @@ -2,8 +2,8 @@ val kotlin_version: String by project val logback_version: String by project plugins { - kotlin("jvm") version "1.8.0" - id("io.ktor.plugin") version "2.3.1" + kotlin("jvm") version "1.8.22" + id("io.ktor.plugin") version "2.3.2" } application { diff --git a/reverse-proxy/gradle.properties b/reverse-proxy/gradle.properties index 26ec6bba..43d1baaf 100644 --- a/reverse-proxy/gradle.properties +++ b/reverse-proxy/gradle.properties @@ -1,3 +1,3 @@ -kotlin_version=1.8.0 +kotlin_version=1.8.22 logback_version=1.2.11 kotlin.code.style=official diff --git a/rx/build.gradle.kts b/rx/build.gradle.kts index 4e00cd46..93f6cfe9 100644 --- a/rx/build.gradle.kts +++ b/rx/build.gradle.kts @@ -2,8 +2,8 @@ val kotlin_version: String by project val logback_version: String by project plugins { - kotlin("jvm") version "1.8.0" - id("io.ktor.plugin") version "2.3.1" + kotlin("jvm") version "1.8.22" + id("io.ktor.plugin") version "2.3.2" } application { diff --git a/rx/gradle.properties b/rx/gradle.properties index 26ec6bba..43d1baaf 100644 --- a/rx/gradle.properties +++ b/rx/gradle.properties @@ -1,3 +1,3 @@ -kotlin_version=1.8.0 +kotlin_version=1.8.22 logback_version=1.2.11 kotlin.code.style=official diff --git a/sse/build.gradle.kts b/sse/build.gradle.kts index 459cc418..decbfb4b 100644 --- a/sse/build.gradle.kts +++ b/sse/build.gradle.kts @@ -2,8 +2,8 @@ val kotlin_version: String by project val logback_version: String by project plugins { - kotlin("jvm") version "1.8.0" - id("io.ktor.plugin") version "2.3.1" + kotlin("jvm") version "1.8.22" + id("io.ktor.plugin") version "2.3.2" } application { diff --git a/sse/gradle.properties b/sse/gradle.properties index 26ec6bba..43d1baaf 100644 --- a/sse/gradle.properties +++ b/sse/gradle.properties @@ -1,3 +1,3 @@ -kotlin_version=1.8.0 +kotlin_version=1.8.22 logback_version=1.2.11 kotlin.code.style=official diff --git a/structured-logging/build.gradle.kts b/structured-logging/build.gradle.kts index 896be576..4a935013 100644 --- a/structured-logging/build.gradle.kts +++ b/structured-logging/build.gradle.kts @@ -2,8 +2,8 @@ val kotlin_version: String by project val logback_version: String by project plugins { - kotlin("jvm") version "1.8.0" - id("io.ktor.plugin") version "2.3.1" + kotlin("jvm") version "1.8.22" + id("io.ktor.plugin") version "2.3.2" } application { diff --git a/structured-logging/gradle.properties b/structured-logging/gradle.properties index 26ec6bba..43d1baaf 100644 --- a/structured-logging/gradle.properties +++ b/structured-logging/gradle.properties @@ -1,3 +1,3 @@ -kotlin_version=1.8.0 +kotlin_version=1.8.22 logback_version=1.2.11 kotlin.code.style=official diff --git a/version-diff/build.gradle.kts b/version-diff/build.gradle.kts index e4b1b0b6..d01f51ef 100644 --- a/version-diff/build.gradle.kts +++ b/version-diff/build.gradle.kts @@ -4,9 +4,9 @@ val kotlin_version: String by project val logback_version: String by project plugins { - kotlin("jvm") version "1.8.0" - id("io.ktor.plugin") version "2.3.1" - kotlin("plugin.serialization") version "1.8.0" + kotlin("jvm") version "1.8.22" + id("io.ktor.plugin") version "2.3.2" + kotlin("plugin.serialization") version "1.8.22" } group = "org.example" diff --git a/version-diff/gradle.properties b/version-diff/gradle.properties index 26ec6bba..43d1baaf 100644 --- a/version-diff/gradle.properties +++ b/version-diff/gradle.properties @@ -1,3 +1,3 @@ -kotlin_version=1.8.0 +kotlin_version=1.8.22 logback_version=1.2.11 kotlin.code.style=official diff --git a/youkube/build.gradle.kts b/youkube/build.gradle.kts index f7ee5a4e..bb29ae49 100644 --- a/youkube/build.gradle.kts +++ b/youkube/build.gradle.kts @@ -2,9 +2,9 @@ val kotlin_version: String by project val logback_version: String by project plugins { - kotlin("jvm") version "1.8.0" - id("io.ktor.plugin") version "2.3.1" - kotlin("plugin.serialization") version "1.8.0" + kotlin("jvm") version "1.8.22" + id("io.ktor.plugin") version "2.3.2" + kotlin("plugin.serialization") version "1.8.22" } application { diff --git a/youkube/gradle.properties b/youkube/gradle.properties index 26ec6bba..43d1baaf 100644 --- a/youkube/gradle.properties +++ b/youkube/gradle.properties @@ -1,3 +1,3 @@ -kotlin_version=1.8.0 +kotlin_version=1.8.22 logback_version=1.2.11 kotlin.code.style=official diff --git a/youkube/src/test/kotlin/YoukubeApplicationTestLegacy.kt b/youkube/src/test/kotlin/YoukubeApplicationTestLegacy.kt index 0459c320..b09a92b9 100644 --- a/youkube/src/test/kotlin/YoukubeApplicationTestLegacy.kt +++ b/youkube/src/test/kotlin/YoukubeApplicationTestLegacy.kt @@ -127,7 +127,10 @@ private fun CookieTrackerTestApplicationEngine.handleRequest( addHeader("Cookie", cookieValue) setup() }.apply { - trackedCookies = response.headers.values("Set-Cookie").map { parseServerSetCookieHeader(it) } + val setCookie = response.headers.values("Set-Cookie") + if (setCookie.isNotEmpty()) { + trackedCookies = setCookie.map { parseServerSetCookieHeader(it) } + } } }