diff --git a/README.md b/README.md index eac1229..b6403b9 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ # Kotlin Multiplatform Bounded Open/Closed Generic Intervals -[![Publish snapshots](https://github.com/Whathecode/kotlinx.interval/actions/workflows/publish-snapshots.yml/badge.svg)](https://github.com/Whathecode/kotlinx.interval/actions/workflows/ci.yml) -[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.whathecode.kotlinx.interval/kotlinx-interval?server=https%3A%2F%2Fs01.oss.sonatype.org)](https://s01.oss.sonatype.org/content/repositories/snapshots/io/github/whathecode/kotlinx/interval) -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.whathecode.kotlinx.interval/kotlinx-interval/badge.svg?color=orange)](https://mvnrepository.com/artifact/io.github.whathecode.kotlinx.interval) +[![Build](https://img.shields.io/github/actions/workflow/status/Whathecode/kotlinx.interval/publish-snapshots.yml +)](https://github.com/Whathecode/kotlinx.interval/actions/workflows/publish-snapshots.yml) +[![Snapshot](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fcentral.sonatype.com%2Frepository%2Fmaven-snapshots%2Fio%2Fgithub%2Fwhathecode%2Fkotlinx%2Finterval%2Fkotlinx-interval%2Fmaven-metadata.xml +)](https://s01.oss.sonatype.org/content/repositories/snapshots/io/github/whathecode/kotlinx/interval) +[![Maven Central](https://img.shields.io/maven-central/v/io.github.whathecode.kotlinx.interval/kotlinx-interval +)](https://central.sonatype.com/artifact/io.github.whathecode.kotlinx.interval/kotlinx-interval) Represent closed, open, or half-open, bounded intervals in Kotlin and perform common operations on them. _Values_ covered by the interval can be of a different type than _distances_ between those values. diff --git a/kotlinx.interval.datetime/src/commonMain/kotlin/BackwardsCompatibility.kt b/kotlinx.interval.datetime/src/commonMain/kotlin/BackwardsCompatibility.kt new file mode 100644 index 0000000..3304313 --- /dev/null +++ b/kotlinx.interval.datetime/src/commonMain/kotlin/BackwardsCompatibility.kt @@ -0,0 +1,6 @@ +package io.github.whathecode.kotlinx.interval.datetime + + +// In version 2.2.0, `InstantInterval` was moved from this library to the main library. +// This only provides compile-time backwards compatibility for older versions. Not binary compatibility. +typealias InstantInterval = io.github.whathecode.kotlinx.interval.InstantInterval diff --git a/kotlinx.interval/src/commonMain/kotlin/InstantInterval.kt b/kotlinx.interval/src/commonMain/kotlin/InstantInterval.kt index e94ab7b..c77ac6b 100644 --- a/kotlinx.interval/src/commonMain/kotlin/InstantInterval.kt +++ b/kotlinx.interval/src/commonMain/kotlin/InstantInterval.kt @@ -1,7 +1,5 @@ package io.github.whathecode.kotlinx.interval -import io.github.whathecode.kotlinx.interval.Interval -import io.github.whathecode.kotlinx.interval.IntervalTypeOperations import kotlin.math.absoluteValue import kotlin.time.Duration import kotlin.time.Instant