Skip to content

Commit 24cdba8

Browse files
committed
Use the newest Kotlin
1 parent 0c7b05c commit 24cdba8

File tree

67 files changed

+176
-2248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+176
-2248
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id("kotlinx.team.infra") version "0.4.0-dev-81"
2+
id("kotlinx.team.infra") version "0.4.0-dev-82"
33
kotlin("multiplatform") apply false
44
id("org.jetbrains.kotlinx.kover") version "0.8.0-Beta2"
55
}

core/api/kotlinx-datetime.api

Lines changed: 47 additions & 47 deletions
Large diffs are not rendered by default.

core/api/kotlinx-datetime.klib.api

Lines changed: 45 additions & 45 deletions
Large diffs are not rendered by default.

core/build.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ kotlin {
188188
commonMain {
189189
dependencies {
190190
compileOnly("org.jetbrains.kotlinx:kotlinx-serialization-core:$serializationVersion")
191-
api(project(":fake-kotlinx-time"))
192191
}
193192
}
194193

@@ -223,6 +222,10 @@ kotlin {
223222
}
224223
}
225224
}
225+
226+
compilerOptions {
227+
optIn.add("kotlin.time.ExperimentalTime")
228+
}
226229
}
227230

228231
tasks {

core/common/src/Clock.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
package kotlinx.datetime
99

1010
import kotlin.time.*
11-
import kotlinx.time.Clock
12-
import kotlinx.time.Instant
13-
import kotlinx.time.isDistantFuture
11+
import kotlin.time.Clock
12+
import kotlin.time.Instant
13+
import kotlin.time.isDistantFuture
1414
import kotlin.jvm.JvmMultifileClass
1515
import kotlin.jvm.JvmName
1616
import kotlin.time.Duration.Companion.seconds

core/common/src/DeprecatedClock.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import kotlin.time.TimeSource
2828
*/
2929
@Deprecated(
3030
"Use kotlin.time.Clock instead",
31-
ReplaceWith("kotlinx.time.Clock", "kotlinx.time.Clock"),
31+
ReplaceWith("kotlin.time.Clock", "kotlin.time.Clock"),
3232
level = DeprecationLevel.WARNING
3333
)
3434
public interface Clock {
@@ -65,7 +65,7 @@ public interface Clock {
6565
* @sample kotlinx.datetime.test.samples.ClockSamples.dependencyInjection
6666
*/
6767
public object System : Clock {
68-
override fun now(): Instant = kotlinx.time.Clock.System.now().toDeprecatedInstant()
68+
override fun now(): Instant = kotlin.time.Clock.System.now().toDeprecatedInstant()
6969
}
7070

7171
/** A companion object used purely for namespacing. */

core/common/src/DeprecatedInstant.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ import kotlin.jvm.JvmName
2121
import kotlin.time.Duration
2222
import kotlin.time.TimeSource
2323

24-
public fun Instant.toStdlibInstant(): kotlinx.time.Instant =
25-
kotlinx.time.Instant.fromEpochSeconds(epochSeconds, nanosecondsOfSecond)
24+
public fun Instant.toStdlibInstant(): kotlin.time.Instant =
25+
kotlin.time.Instant.fromEpochSeconds(epochSeconds, nanosecondsOfSecond)
2626

27-
public fun kotlinx.time.Instant.toDeprecatedInstant(): Instant =
27+
public fun kotlin.time.Instant.toDeprecatedInstant(): Instant =
2828
Instant.fromEpochSeconds(epochSeconds, nanosecondsOfSecond)
2929

3030
@Deprecated(
3131
"Use kotlin.time.Instant instead",
32-
ReplaceWith("kotlinx.time.Instant", "kotlinx.time.Instant"),
32+
ReplaceWith("kotlin.time.Instant", "kotlin.time.Instant"),
3333
level = DeprecationLevel.WARNING
3434
)
3535
@Serializable(with = InstantIso8601Serializer::class)
@@ -185,7 +185,7 @@ public expect class Instant : Comparable<Instant> {
185185

186186

187187
public companion object {
188-
@Deprecated("Use Clock.System.now() instead", ReplaceWith("Clock.System.now()", "kotlinx.time.Clock"), level = DeprecationLevel.ERROR)
188+
@Deprecated("Use Clock.System.now() instead", ReplaceWith("Clock.System.now()", "kotlin.time.Clock"), level = DeprecationLevel.ERROR)
189189
public fun now(): Instant
190190

191191
/**
@@ -288,7 +288,7 @@ public expect class Instant : Comparable<Instant> {
288288
*/
289289
@Deprecated("kotlinx.datetime.Instant is superseded by kotlin.time.Instant",
290290
level = DeprecationLevel.WARNING,
291-
replaceWith = ReplaceWith("this.toStdlibInstant().isDistantPast", "kotlinx.time.isDistantPast")
291+
replaceWith = ReplaceWith("this.toStdlibInstant().isDistantPast", "kotlin.time.isDistantPast")
292292
)
293293
public val Instant.isDistantPast: Boolean
294294
get() = this <= Instant.DISTANT_PAST
@@ -300,7 +300,7 @@ public val Instant.isDistantPast: Boolean
300300
*/
301301
@Deprecated("kotlinx.datetime.Instant is superseded by kotlin.time.Instant",
302302
level = DeprecationLevel.WARNING,
303-
replaceWith = ReplaceWith("this.toStdlibInstant().isDistantPast", "kotlinx.time.isDistantFuture")
303+
replaceWith = ReplaceWith("this.toStdlibInstant().isDistantPast", "kotlin.time.isDistantFuture")
304304
)
305305
public val Instant.isDistantFuture: Boolean
306306
get() = this >= Instant.DISTANT_FUTURE

core/common/src/Instant.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ package kotlinx.datetime
1010
import kotlinx.datetime.format.*
1111
import kotlinx.datetime.internal.*
1212
import kotlin.time.*
13-
import kotlinx.time.Instant
13+
import kotlin.time.Instant
1414
import kotlin.jvm.JvmMultifileClass
1515
import kotlin.jvm.JvmName
1616

core/common/src/TimeZone.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ package kotlinx.datetime
1010

1111
import kotlinx.datetime.serializers.*
1212
import kotlinx.serialization.Serializable
13-
import kotlinx.time.Instant
13+
import kotlin.time.Instant
1414

1515
/**
1616
* A time zone, provides the conversion between [Instant] and [LocalDateTime] values

core/common/src/format/DateTimeComponents.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import kotlinx.datetime.internal.format.*
1212
import kotlinx.datetime.internal.format.parser.Copyable
1313
import kotlinx.datetime.internal.safeMultiply
1414
import kotlin.reflect.*
15-
import kotlinx.time.Instant
15+
import kotlin.time.Instant
1616

1717
/**
1818
* A collection of datetime fields used specifically for parsing and formatting.

0 commit comments

Comments
 (0)