Skip to content

Commit

Permalink
Update kotlin to 1.9.10 (#3761)
Browse files Browse the repository at this point in the history
* Fix mingwX64 compilation

* Update kotlin to 1.9.10

* Fix CallLogging tests

* Fix js compilation

(cherry picked from commit 8a9f4a5)
  • Loading branch information
e5l committed Oct 3, 2023
1 parent 5fd1d2f commit e1a35c3
Show file tree
Hide file tree
Showing 105 changed files with 725 additions and 677 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ apply(from = "gradle/compatibility.gradle")

plugins {
id("org.jetbrains.dokka") version "1.7.20" apply false
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.12.1"
id("kotlinx-atomicfu") version "0.19.0" apply false
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.13.2"
id("kotlinx-atomicfu") version "0.22.0" apply false
id("com.osacky.doctor") version "0.8.1"
}

Expand Down
8 changes: 4 additions & 4 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*/

plugins {
id("org.gradle.kotlin.kotlin-dsl") version "3.2.4"
kotlin("plugin.serialization") version "1.7.21"
id("org.gradle.kotlin.kotlin-dsl") version "4.1.0"
kotlin("plugin.serialization") version "1.9.0"
}

val buildSnapshotTrain = properties["build_snapshot_train"]?.toString()?.toBoolean() == true
Expand All @@ -24,8 +24,8 @@ sourceSets.main {
val ktor_version = "2.3.2"

dependencies {
implementation(kotlin("gradle-plugin", "1.8.22"))
implementation(kotlin("serialization", "1.8.22"))
implementation(kotlin("gradle-plugin", "1.9.10"))
implementation(kotlin("serialization", "1.9.10"))

val ktlint_version = libs.versions.ktlint.version.get()
implementation("org.jmailen.gradle:kotlinter-gradle:$ktlint_version")
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/CommonConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ fun Project.configureCommon() {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version")
}
}

val commonTest by getting {
commonTest {
dependencies {
implementation(kotlin("test"))
}
Expand Down
22 changes: 13 additions & 9 deletions buildSrc/src/main/kotlin/JsConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,24 @@ private fun Project.configureJsTasks() {
kotlin {
js(IR) {
nodejs {
testTask {
useMocha {
timeout = "10000"
testTask(
Action {
useMocha {
timeout = "10000"
}
}
}
)
}

browser {
testTask {
useKarma {
useChromeHeadless()
useConfigDirectory(File(project.rootProject.projectDir, "karma"))
testTask(
Action {
useKarma {
useChromeHeadless()
useConfigDirectory(File(project.rootProject.projectDir, "karma"))
}
}
}
)
}

binaries.library()
Expand Down
10 changes: 10 additions & 0 deletions buildSrc/src/main/kotlin/KotlinExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ fun KotlinMultiplatformExtension.createCInterop(
}
}

fun NamedDomainObjectContainer<KotlinSourceSet>.commonMain(block: KotlinSourceSet.() -> Unit) {
val sourceSet = getByName("commonMain")
block(sourceSet)
}

fun NamedDomainObjectContainer<KotlinSourceSet>.commonTest(block: KotlinSourceSet.() -> Unit) {
val sourceSet = getByName("commonTest")
block(sourceSet)
}

fun NamedDomainObjectContainer<KotlinSourceSet>.jvmAndNixMain(block: KotlinSourceSet.() -> Unit) {
val sourceSet = findByName("jvmAndNixMain") ?: getByName("jvmMain")
block(sourceSet)
Expand Down
11 changes: 11 additions & 0 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Copyright 2014-2023 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/

object Versions {
val kotlin = "1.9.10"
val coroutines = "1.7.2"
val slf4j = "1.7.36"
val junit = "4.13.2"
val logback = "1.2.11"
}
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/test/server/ServerUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ fun List<PartData>.makeString(): String = buildString {
}
}

@Suppress("DEPRECATION")
private fun filenameContentTypeAndContentString(provider: () -> Input, headers: Headers): String {
val dispositionHeader: String = headers.getAll(HttpHeaders.ContentDisposition)!!.joinToString(";")
val disposition: ContentDisposition = ContentDisposition.parse(dispositionHeader)
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ktor.ide.jvmAndCommonOnly=true
kotlin.code.style=official

# config
version=2.3.4
version=2.3.5

# gradle
org.gradle.daemon=true
Expand All @@ -34,7 +34,7 @@ kotlin.native.binary.memoryModel=experimental

kotlin_version=1.8.22
coroutines_version=1.7.1
atomicfu_version=0.20.2
atomicfu_version=0.22.2
slf4j_version=1.7.36
junit_version=4.13.2
logback_version=1.2.11
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
kotlin-version = "1.8.22"
kotlinx-html-version = "0.9.1"
coroutines-version = "1.7.2"
atomicfu-version = "0.20.2"
atomicfu-version = "0.22.0"
serialization-version = "1.5.1"
validator-version = "0.8.0"
ktlint-version = "3.15.0"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit e1a35c3

Please sign in to comment.