Skip to content

Update Kotlin to 1.9.10 #309

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

Closed
wants to merge 4 commits into from
Closed
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![JetBrains official project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)
[![Maven Central](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlinx-datetime.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22org.jetbrains.kotlinx%22%20AND%20a:%22kotlinx-datetime%22)
[![Kotlin](https://img.shields.io/badge/kotlin-1.8.21-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![Kotlin](https://img.shields.io/badge/kotlin-1.9.10-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![KDoc link](https://img.shields.io/badge/API_reference-KDoc-blue)](https://kotlinlang.org/api/kotlinx-datetime/)
[![Slack channel](https://img.shields.io/badge/chat-slack-blue.svg?logo=slack)](https://kotlinlang.slack.com/messages/kotlinx-datetime/)
[![TeamCity build](https://img.shields.io/teamcity/build/s/KotlinTools_KotlinxDatetime_Build_All.svg?server=http%3A%2F%2Fteamcity.jetbrains.com)](https://teamcity.jetbrains.com/viewType.html?buildTypeId=KotlinTools_KotlinxDatetime_Build_All&guest=1)
Expand Down
2 changes: 1 addition & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ kotlin {

}

js {
js(IR) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FenstonSingel can I ask why you specified IR explicitly? Isn't the default IR now?
Just curious as in my libraries I'm now omitting it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it shouldn't be needed. Instead, the gradle property kotlin.js.compiler=both should be removed.

nodejs {
testTask {
useMocha {
Expand Down
3 changes: 2 additions & 1 deletion core/darwin/src/Converters.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/*
* Copyright 2019-2020 JetBrains s.r.o.
* Copyright 2019-2023 JetBrains s.r.o.
* Use of this source code is governed by the Apache 2.0 License that can be found in the LICENSE.txt file.
*/
@file:OptIn(ExperimentalForeignApi::class, UnsafeNumber::class)

package kotlinx.datetime
import kotlinx.cinterop.*
Expand Down
5 changes: 3 additions & 2 deletions core/darwin/src/TimeZoneNative.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/*
* Copyright 2019-2020 JetBrains s.r.o.
* Copyright 2019-2023 JetBrains s.r.o.
* Use of this source code is governed by the Apache 2.0 License that can be found in the LICENSE.txt file.
*/

@file:OptIn(UnsafeNumber::class)
package kotlinx.datetime

import kotlinx.cinterop.*
import platform.Foundation.*

private fun dateWithTimeIntervalSince1970Saturating(epochSeconds: Long): NSDate {
Expand Down
3 changes: 2 additions & 1 deletion core/darwin/test/ConvertersTest.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2020 JetBrains s.r.o.
* Copyright 2019-2023 JetBrains s.r.o.
* Use of this source code is governed by the Apache 2.0 License that can be found in the LICENSE.txt file.
*/
package kotlinx.datetime.test
Expand Down Expand Up @@ -94,6 +94,7 @@ class ConvertersTest {
assertEquals(str + "Z", dateFormatter.stringFromDate(nsDate))
}

@OptIn(ExperimentalForeignApi::class)
private fun zoneOffsetCheck(timeZone: FixedOffsetTimeZone, hours: Int, minutes: Int) {
val nsTimeZone = timeZone.toNSTimeZone()
val kotlinTimeZone = nsTimeZone.toKotlinTimeZone()
Expand Down
5 changes: 3 additions & 2 deletions core/native/cinterop_actuals/TimeZoneNative.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/*
* Copyright 2019-2020 JetBrains s.r.o.
* Copyright 2019-2023 JetBrains s.r.o.
* Use of this source code is governed by the Apache 2.0 License that can be found in the LICENSE.txt file.
*/
@file:OptIn(ExperimentalForeignApi::class)
package kotlinx.datetime

import kotlinx.datetime.internal.*
Expand Down Expand Up @@ -95,4 +96,4 @@ internal actual fun currentTime(): Instant = memScoped {
} catch (e: IllegalArgumentException) {
throw IllegalStateException("The readings from the system clock are not representable as an Instant")
}
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ group=org.jetbrains.kotlinx
version=0.4.1
versionSuffix=SNAPSHOT

defaultKotlinVersion=1.8.21
defaultKotlinVersion=1.9.10
dokkaVersion=1.8.20
serializationVersion=1.5.1

Expand Down
Loading