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
Show file tree
Hide file tree
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
Expand Up @@ -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") }
Expand Down
14 changes: 0 additions & 14 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ kotlin {
}
}
}
compilations.all {
kotlinOptions {
sourceMap = true
moduleKind = "umd"
}
}
// compilations["main"].apply {
// kotlinOptions {
// outputFile = "kotlinx-datetime-tmp.js"
Expand Down Expand Up @@ -411,14 +405,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 {
Expand Down
9 changes: 1 addition & 8 deletions core/common/src/DateTimeUnit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ versionSuffix=SNAPSHOT

tzdbVersion=2025b

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


Expand Down