Skip to content

Commit 87e51f5

Browse files
committed
upgrade kotlin to 2.2.0
Let's take advantage of the upcoming major release to upgrade kotlin and other dependencies. The main point of attention is a breaking change in `kotlinx-datetime`: see https://github.com/Kotlin/kotlinx-datetime?tab=readme-ov-file#deprecation-of-instant.
1 parent c5b5b03 commit 87e51f5

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Kotlin](https://img.shields.io/badge/Kotlin-2.1.21-blue.svg?style=flat&logo=kotlin)](http://kotlinlang.org)
1+
[![Kotlin](https://img.shields.io/badge/Kotlin-2.2.20-blue.svg?style=flat&logo=kotlin)](http://kotlinlang.org)
22
[![Maven Central](https://img.shields.io/maven-central/v/fr.acinq.lightning/lightning-kmp-core)](https://search.maven.org/search?q=g:fr.acinq.lightning%20a:lightning-kmp*)
33
![Github Actions](https://github.com/ACINQ/lightning-kmp/actions/workflows/test.yml/badge.svg)
44
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)

gradle/libs.versions.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
[versions]
2-
kotlin = "2.1.21"
2+
kotlin = "2.2.20"
33
kotlinx-coroutines = "1.10.2"
4-
kotlinx-datetime = "0.6.2"
5-
kotlinx-serialization = "1.8.1"
6-
ktor = "3.1.2"
4+
kotlinx-datetime = "0.7.1"
5+
kotlinx-serialization = "1.9.0"
6+
ktor = "3.3.0"
77
bitcoinkmp = "0.26.0" # when upgrading bitcoin-kmp, keep secpjnijvm in sync!
88
secpjnijvm = "0.19.0"
9-
kermit = "2.0.5"
10-
slf4j = "2.0.16"
9+
kermit = "2.0.8"
10+
slf4j = "2.0.17"
1111

1212
# test dependencies
13-
test-kotlinx-io-core = "0.6.0"
13+
test-kotlinx-io-core = "0.8.0"
1414
test-bouncycastle = "1.64"
15-
test-logback = "1.5.16"
16-
test-sqlitejdbc = "3.32.3.3"
15+
test-logback = "1.5.19"
16+
test-sqlitejdbc = "3.50.3.0"
1717

1818
[plugins]
1919
multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package fr.acinq.lightning.utils
22

3-
import kotlinx.datetime.Clock
3+
import kotlin.time.Clock
4+
import kotlin.time.ExperimentalTime
45

6+
@OptIn(ExperimentalTime::class)
57
fun currentTimestampMillis(): Long = Clock.System.now().toEpochMilliseconds()
68

79
fun currentTimestampSeconds(): Long = currentTimestampMillis() / 1000

0 commit comments

Comments
 (0)