Skip to content

Preliminary attempt to upgrade to Kotlin 2.2.0 #526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ allprojects {
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
// outputs the compiler version to logs so we can check whether the train configuration applied
kotlinOptions.freeCompilerArgs += "-version"
compilerOptions { freeCompilerArgs.add("-version") }
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile>().configureEach {
compilerOptions { freeCompilerArgs.add("-Xjvm-default=disable") }
14 changes: 0 additions & 14 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -101,12 +101,6 @@ kotlin {
}
}
}
compilations.all {
kotlinOptions {
sourceMap = true
moduleKind = "umd"
}
}
// compilations["main"].apply {
// kotlinOptions {
// outputFile = "kotlinx-datetime-tmp.js"
@@ -415,14 +409,6 @@ tasks.configureEach {
}
}

// Drop this configuration when the Node.JS version in KGP will support wasm gc milestone 4
// check it here:
// https://github.com/JetBrains/kotlin/blob/master/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/js/nodejs/NodeJsRootExtension.kt
with(org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin.apply(rootProject)) {
nodeVersion = "21.0.0-v8-canary202309167e82ab1fa2"
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
}

apiValidation {
@OptIn(kotlinx.validation.ExperimentalBCVApi::class)
klib {
9 changes: 1 addition & 8 deletions core/common/src/DateTimeUnit.kt
Original file line number Diff line number Diff line change
@@ -152,14 +152,7 @@ public sealed class DateTimeUnit {
* @see DateTimeUnit.MonthBased for specifically month-based units.
*/
@Serializable(with = DateBasedDateTimeUnitSerializer::class)
public sealed class DateBased : DateTimeUnit() {
@Suppress("TOPLEVEL_TYPEALIASES_ONLY")
@Deprecated("Use DateTimeUnit.DayBased", ReplaceWith("DateTimeUnit.DayBased", "kotlinx.datetime.DateTimeUnit"))
public typealias DayBased = DateTimeUnit.DayBased
@Suppress("TOPLEVEL_TYPEALIASES_ONLY")
@Deprecated("Use DateTimeUnit.MonthBased", ReplaceWith("DateTimeUnit.MonthBased", "kotlinx.datetime.DateTimeUnit"))
public typealias MonthBased = DateTimeUnit.MonthBased
}
public sealed class DateBased : DateTimeUnit()

/**
* A [datetime unit][DateTimeUnit] equal to some number of calendar days.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ versionSuffix=SNAPSHOT

tzdbVersion=2025b

defaultKotlinVersion=2.1.20
defaultKotlinVersion=2.2.0-RC
dokkaVersion=2.0.0
serializationVersion=1.6.2
benchmarksVersion=0.7.2
6 changes: 0 additions & 6 deletions integration-testing/serialization/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -50,12 +50,6 @@ kotlin {
js {
nodejs {
}
compilations.all {
kotlinOptions {
sourceMap = true
moduleKind = "umd"
}
}
}


5 changes: 0 additions & 5 deletions kotlin-js-store/yarn.lock
Original file line number Diff line number Diff line change
@@ -466,11 +466,6 @@ to-regex-range@^5.0.1:
dependencies:
is-number "^7.0.0"

typescript@5.5.4:
version "5.5.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba"
integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==

workerpool@^6.5.1:
version "6.5.1"
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544"