From a70438f4f8ccecdc3d72b4577b8face62ca0c32f Mon Sep 17 00:00:00 2001 From: Philip Wedemann <22521688+hfhbd@users.noreply.github.com> Date: Sat, 17 Aug 2024 14:16:08 +0200 Subject: [PATCH 1/2] Change package name to app.softwork (#379) * change package to app.softwork * Rename UUID to Uuid * Fix docs --- README.md | 9 +-- detekt-baseline.xml | 59 ++++++++++--------- .../src/main/kotlin/dokkaLicensee.gradle.kts | 5 ++ kotlinx-uuid-core/README.md | 40 +++---------- .../api/android/kotlinx-uuid-core.api | 32 +++++----- .../api/jvm/kotlinx-uuid-core.api | 30 +++++----- kotlinx-uuid-core/build.gradle.kts | 2 +- .../softwork}/uuid/internal/ParcelableTest.kt | 4 +- .../softwork/uuid}/UuidParceler.kt | 2 +- .../kotlin/app/softwork/uuid/Converter.kt | 20 +++++++ .../kotlin/kotlinx/uuid/Converter.kt | 19 ------ .../softwork}/uuid/NsUUIDConvertingTest.kt | 2 +- .../softwork}/uuid/BinarySerializer.kt | 8 +-- .../softwork}/uuid/NameBasedGenerator.kt | 16 ++--- .../softwork}/uuid/RandomGenerator.kt | 6 +- .../UUID.kt => app/softwork/uuid/Uuid.kt} | 26 ++++---- .../kotlin/app/softwork/uuid/Uuidv7.kt | 36 +++++++++++ .../softwork}/uuid/internal/SHA1.kt | 2 +- .../commonMain/kotlin/kotlinx/uuid/UUID7.kt | 42 ------------- .../softwork}/uuid/BinarySerializationTest.kt | 2 +- .../softwork}/uuid/GenerationTest.kt | 8 +-- .../softwork}/uuid/SHA1Test.kt | 4 +- .../softwork/uuid/UuidTest.kt} | 16 ++--- .../kotlin/app/softwork/uuid/Uuidv7Test.kt | 16 +++++ .../kotlin/kotlinx/uuid/UUIDv7Test.kt | 18 ------ .../kotlin/app/softwork/uuid/Converting.kt | 20 +++++++ .../jvmMain/kotlin/kotlinx/uuid/Converting.kt | 18 ------ .../softwork}/uuid/JavaConvertingTest.kt | 2 +- .../softwork}/uuid/JavaSpecificTests.kt | 2 +- kotlinx-uuid-datetime/README.md | 4 +- .../api/kotlinx-uuid-datetime.api | 6 +- .../kotlin/app/softwork/uuid/datetime/Dsl.kt | 16 +++++ .../kotlin/kotlinx/uuid/datetime/Dsl.kt | 16 ----- .../softwork}/uuid/datetime/InstantTest.kt | 8 +-- kotlinx-uuid-sqldelight/README.md | 6 +- .../api/kotlinx-uuid-sqldelight.api | 8 +-- .../uuid/sqldelight/UuidByteArrayAdapter.kt | 2 +- .../uuid/sqldelight/UuidStringAdapter.kt | 2 +- 38 files changed, 255 insertions(+), 279 deletions(-) rename kotlinx-uuid-core/src/androidInstrumentedTest/kotlin/{kotlinx => app/softwork}/uuid/internal/ParcelableTest.kt (93%) rename kotlinx-uuid-core/src/androidMain/kotlin/{kotlinx/uuid/internal => app/softwork/uuid}/UuidParceler.kt (94%) create mode 100644 kotlinx-uuid-core/src/appleMain/kotlin/app/softwork/uuid/Converter.kt delete mode 100644 kotlinx-uuid-core/src/appleMain/kotlin/kotlinx/uuid/Converter.kt rename kotlinx-uuid-core/src/appleTest/kotlin/{kotlinx => app/softwork}/uuid/NsUUIDConvertingTest.kt (96%) rename kotlinx-uuid-core/src/commonMain/kotlin/{kotlinx => app/softwork}/uuid/BinarySerializer.kt (86%) rename kotlinx-uuid-core/src/commonMain/kotlin/{kotlinx => app/softwork}/uuid/NameBasedGenerator.kt (75%) rename kotlinx-uuid-core/src/commonMain/kotlin/{kotlinx => app/softwork}/uuid/RandomGenerator.kt (85%) rename kotlinx-uuid-core/src/commonMain/kotlin/{kotlinx/uuid/UUID.kt => app/softwork/uuid/Uuid.kt} (80%) create mode 100644 kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/Uuidv7.kt rename kotlinx-uuid-core/src/commonMain/kotlin/{kotlinx => app/softwork}/uuid/internal/SHA1.kt (99%) delete mode 100644 kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/UUID7.kt rename kotlinx-uuid-core/src/commonTest/kotlin/{kotlinx => app/softwork}/uuid/BinarySerializationTest.kt (98%) rename kotlinx-uuid-core/src/commonTest/kotlin/{kotlinx => app/softwork}/uuid/GenerationTest.kt (87%) rename kotlinx-uuid-core/src/commonTest/kotlin/{kotlinx => app/softwork}/uuid/SHA1Test.kt (97%) rename kotlinx-uuid-core/src/commonTest/kotlin/{kotlinx/uuid/UUIDTest.kt => app/softwork/uuid/UuidTest.kt} (93%) create mode 100644 kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/Uuidv7Test.kt delete mode 100644 kotlinx-uuid-core/src/commonTest/kotlin/kotlinx/uuid/UUIDv7Test.kt create mode 100644 kotlinx-uuid-core/src/jvmMain/kotlin/app/softwork/uuid/Converting.kt delete mode 100644 kotlinx-uuid-core/src/jvmMain/kotlin/kotlinx/uuid/Converting.kt rename kotlinx-uuid-core/src/jvmTest/kotlin/{kotlinx => app/softwork}/uuid/JavaConvertingTest.kt (96%) rename kotlinx-uuid-core/src/jvmTest/kotlin/{kotlinx => app/softwork}/uuid/JavaSpecificTests.kt (94%) create mode 100644 kotlinx-uuid-datetime/src/commonMain/kotlin/app/softwork/uuid/datetime/Dsl.kt delete mode 100644 kotlinx-uuid-datetime/src/commonMain/kotlin/kotlinx/uuid/datetime/Dsl.kt rename kotlinx-uuid-datetime/src/commonTest/kotlin/{kotlinx => app/softwork}/uuid/datetime/InstantTest.kt (64%) rename kotlinx-uuid-sqldelight/src/commonMain/kotlin/{kotlinx => app/softwork}/uuid/sqldelight/UuidByteArrayAdapter.kt (88%) rename kotlinx-uuid-sqldelight/src/commonMain/kotlin/{kotlinx => app/softwork}/uuid/sqldelight/UuidStringAdapter.kt (87%) diff --git a/README.md b/README.md index b631315..2f53537 100644 --- a/README.md +++ b/README.md @@ -3,18 +3,11 @@ > #### This is a fork from https://github.com/cy6erGn0m/kotlinx-uuid, released under Apache 2. > #### The main implementation was thankfully provided by [Sergey Mashkov (cy6erGn0m)](https://github.com/cy6erGn0m)! -`kotlinx-uuid` is a multiplatform (MPP) [Kotlin](https://kotlinlang.org) library introducing support -for [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). +`kotlinx-uuid` adds helper methods to [Uuid](kotlin.uuid.Uuid) added to Kotlin stdlib starting 2.0.20. - [Source code](https://github.com/hfhbd/kotlinx-uuid) - [Docs](https://uuid.softwork.app) -The main class `UUID` is serializable out of the box, so the library depends -on [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization). If you don't need serialization, you don't -need to apply the plugin. - -Supported platforms are `jvm`, `js(IR)` and all tier 1, 2 and 3 native targets. - ## Install This package is uploaded to `mavenCentral`. diff --git a/detekt-baseline.xml b/detekt-baseline.xml index a4c99bc..acb580f 100644 --- a/detekt-baseline.xml +++ b/detekt-baseline.xml @@ -2,8 +2,8 @@ - FunctionNaming:Dsl.kt$public fun UUIDv7(timeStamp: Instant = Clock.System.now(), random: Random): Uuid - FunctionNaming:UUID7.kt$public fun UUIDv7(timeStamp: Long, random: Random): Uuid + FunctionNaming:Dsl.kt$public fun Uuidv7(timeStamp: Instant = Clock.System.now(), random: Random): Uuid + FunctionNaming:Uuidv7.kt$public fun Uuidv7(timeStamp: Long, random: Random): Uuid MagicNumber:KotlinConfig.kt$8 MagicNumber:NameBasedGenerator.kt$0x3f MagicNumber:NameBasedGenerator.kt$4 @@ -44,31 +44,36 @@ MagicNumber:SHA1.kt$SHA1.IntArrayView$3 MagicNumber:SHA1.kt$SHA1.IntArrayView$4 MagicNumber:SHA1.kt$SHA1.IntArrayView$8 - MagicNumber:UUID.kt$0x0fffL - MagicNumber:UUID.kt$0x1fff - MagicNumber:UUID.kt$0xf000L - MagicNumber:UUID.kt$0xffff00000000L - MagicNumber:UUID.kt$0xffff0000L - MagicNumber:UUID.kt$0xffffffffffffL - MagicNumber:UUID.kt$12 - MagicNumber:UUID.kt$13 - MagicNumber:UUID.kt$15 - MagicNumber:UUID.kt$16 - MagicNumber:UUID.kt$32 - MagicNumber:UUID.kt$4 - MagicNumber:UUID.kt$48 - MagicNumber:UUID.kt$5 - MagicNumber:UUID.kt$60 - MagicNumber:UUID.kt$61 - MagicNumber:UUID.kt$7 - MagicNumber:UUID7.kt$0x0fffL - MagicNumber:UUID7.kt$0xffff0000L - MagicNumber:UUID7.kt$16 - MagicNumber:UUID7.kt$28672 - MagicNumber:UUID7.kt$32 - MagicNumber:UUID7.kt$4095 - MagicNumber:UUID7.kt$48 - MagicNumber:UUID7.kt$62 + MagicNumber:Uuid.kt$0x0fffL + MagicNumber:Uuid.kt$0x1fff + MagicNumber:Uuid.kt$0xf000L + MagicNumber:Uuid.kt$0xffff00000000L + MagicNumber:Uuid.kt$0xffff0000L + MagicNumber:Uuid.kt$0xffffffffffffL + MagicNumber:Uuid.kt$12 + MagicNumber:Uuid.kt$13 + MagicNumber:Uuid.kt$15 + MagicNumber:Uuid.kt$16 + MagicNumber:Uuid.kt$32 + MagicNumber:Uuid.kt$4 + MagicNumber:Uuid.kt$48 + MagicNumber:Uuid.kt$5 + MagicNumber:Uuid.kt$60 + MagicNumber:Uuid.kt$61 + MagicNumber:Uuid.kt$7 + MagicNumber:Uuidv7.kt$0x3F + MagicNumber:Uuidv7.kt$0x70 + MagicNumber:Uuidv7.kt$0x80 + MagicNumber:Uuidv7.kt$0xFF + MagicNumber:Uuidv7.kt$16 + MagicNumber:Uuidv7.kt$24 + MagicNumber:Uuidv7.kt$3 + MagicNumber:Uuidv7.kt$32 + MagicNumber:Uuidv7.kt$4 + MagicNumber:Uuidv7.kt$40 + MagicNumber:Uuidv7.kt$5 + MagicNumber:Uuidv7.kt$6 + MagicNumber:Uuidv7.kt$8 TooManyFunctions:SHA1.kt$SHA1 diff --git a/gradle/build-logic/src/main/kotlin/dokkaLicensee.gradle.kts b/gradle/build-logic/src/main/kotlin/dokkaLicensee.gradle.kts index 4fc1f53..e9a51fb 100644 --- a/gradle/build-logic/src/main/kotlin/dokkaLicensee.gradle.kts +++ b/gradle/build-logic/src/main/kotlin/dokkaLicensee.gradle.kts @@ -19,6 +19,11 @@ tasks.named("dokkaHtmlPartial") { } } externalDocumentationLink("https://kotlinlang.org/api/kotlinx.serialization/") + externalDocumentationLink( + url = "https://kotlinlang.org/api/kotlinx-datetime/", + packageListUrl = "https://kotlinlang.org/api/kotlinx-datetime/kotlinx-datetime/package-list", + ) + externalDocumentationLink("https://cashapp.github.io/sqldelight/2.0.2/2.x/") } } diff --git a/kotlinx-uuid-core/README.md b/kotlinx-uuid-core/README.md index a04bcbb..bfd621e 100644 --- a/kotlinx-uuid-core/README.md +++ b/kotlinx-uuid-core/README.md @@ -1,37 +1,21 @@ # Module kotlinx-uuid-core -This core module contains the serializable UUID class. - -## Creating from a UUID string - -```kotlin -val uuid = UUID("1b3e4567-e99b-13d3-a476-446657420000") -val guid = UUID("{1b3e4567-e99b-13d3-a476-446657420000}") -``` - -## Generating UUID4 using random - -```kotlin -// using a default SecureRandom implementation -val uuid = UUID() - -// use custom Kotlin Random instance -val uuid = UUID.generateUUID(yourRandom) -``` +This core module contains several helper methods for the [Uuid](kotlin.uuid.Uuid) class, like `timestamp`, `variant`, +`version`. ## Generating UUID5 using hash `kotlinx-uuid` provides the ability to generate uuids by hashing names (Only SHA-1 is supported at the moment). ```kotlin -val appNamespace = UUID("my-app-uuid") -val agentId = UUID.generateUUID(appNamespace, "agentId") +val appNamespace = Uuid.parse("my-app-uuid") +val agentId = Uuid.generateUuid(appNamespace, "agentId") ``` -The other alternative is to generate UUID by hashing bytes (similar to `java.util.UUID.nameUUIDFromBytes`). +The other alternative is to generate Uuid by hashing bytes (similar to `java.util.UUID.nameUUIDFromBytes`). ```kotlin -val uuid = UUID.generateUUID(bytes) +val uuid = Uuid.generateUUID(bytes) ``` > Note that unlike `java.util.UUID`, kotlinx's generateUUID @@ -51,15 +35,9 @@ uuid.unixTimeStamp // 42 ## Serializing (kotlinx.serialization) -There are two serializers for `UUID`: the default one and the binary. - -The default serializer does always serialize UUIDs as string primitives. - -```kotlin -Json.encodeToString(uuid) == "\"1b3e4567-e99b-13d3-a476-446657420000\"" -``` - -The additional serializer is useful for binary formats. Because they are not human-readable, and it's possible to reduce +There is also a binary serializers for `Uuid`. +This additional serializer is useful for binary formats. Because they are not human-readable, and it's possible to +reduce size. ```kotlin diff --git a/kotlinx-uuid-core/api/android/kotlinx-uuid-core.api b/kotlinx-uuid-core/api/android/kotlinx-uuid-core.api index e6c8bc0..4ab80fd 100644 --- a/kotlinx-uuid-core/api/android/kotlinx-uuid-core.api +++ b/kotlinx-uuid-core/api/android/kotlinx-uuid-core.api @@ -1,5 +1,5 @@ -public final class kotlinx/uuid/BinarySerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lkotlinx/uuid/BinarySerializer; +public final class app/softwork/uuid/BinarySerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lapp/softwork/uuid/BinarySerializer; public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lkotlin/uuid/Uuid; public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; @@ -7,22 +7,17 @@ public final class kotlinx/uuid/BinarySerializer : kotlinx/serialization/KSerial public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lkotlin/uuid/Uuid;)V } -public final class kotlinx/uuid/NameBasedGeneratorKt { - public static final fun generateUUID (Lkotlin/uuid/Uuid$Companion;Lkotlin/uuid/Uuid;Ljava/lang/String;)Lkotlin/uuid/Uuid; - public static final fun generateUUID (Lkotlin/uuid/Uuid$Companion;[B)Lkotlin/uuid/Uuid; +public final class app/softwork/uuid/NameBasedGeneratorKt { + public static final fun generateUuid (Lkotlin/uuid/Uuid$Companion;Lkotlin/uuid/Uuid;Ljava/lang/String;)Lkotlin/uuid/Uuid; + public static final fun generateUuid (Lkotlin/uuid/Uuid$Companion;[B)Lkotlin/uuid/Uuid; } -public final class kotlinx/uuid/RandomGeneratorKt { +public final class app/softwork/uuid/RandomGeneratorKt { public static final fun nextUuid (Lkotlin/random/Random;)Lkotlin/uuid/Uuid; public static final fun random (Lkotlin/uuid/Uuid$Companion;Lkotlin/random/Random;)Lkotlin/uuid/Uuid; } -public final class kotlinx/uuid/UUID7Kt { - public static final fun UUIDv7 (JLkotlin/random/Random;)Lkotlin/uuid/Uuid; - public static final fun getUnixTimeStamp (Lkotlin/uuid/Uuid;)J -} - -public final class kotlinx/uuid/UUIDKt { +public final class app/softwork/uuid/UuidKt { public static final fun from (Lkotlin/uuid/Uuid$Companion;IJIJI)Lkotlin/uuid/Uuid; public static synthetic fun from$default (Lkotlin/uuid/Uuid$Companion;IJIJIILjava/lang/Object;)Lkotlin/uuid/Uuid; public static final fun getClockSequence (Lkotlin/uuid/Uuid;)I @@ -31,13 +26,13 @@ public final class kotlinx/uuid/UUIDKt { public static final fun getVariant (Lkotlin/uuid/Uuid;)I public static final fun getVersionNumber (Lkotlin/uuid/Uuid;)I public static final fun isRfcVariant (Lkotlin/uuid/Uuid;)Z - public static final fun isValidUUIDString (Lkotlin/uuid/Uuid$Companion;Ljava/lang/String;)Z - public static final fun toUUIDOrNull (Ljava/lang/String;)Lkotlin/uuid/Uuid; + public static final fun isValidUuidString (Lkotlin/uuid/Uuid$Companion;Ljava/lang/String;)Z public static final fun toUuid (Ljava/lang/String;)Lkotlin/uuid/Uuid; + public static final fun toUuidOrNull (Ljava/lang/String;)Lkotlin/uuid/Uuid; } -public final class kotlinx/uuid/internal/UuidParceler : kotlinx/parcelize/Parceler { - public static final field INSTANCE Lkotlinx/uuid/internal/UuidParceler; +public final class app/softwork/uuid/UuidParceler : kotlinx/parcelize/Parceler { + public static final field INSTANCE Lapp/softwork/uuid/UuidParceler; public synthetic fun create (Landroid/os/Parcel;)Ljava/lang/Object; public fun create (Landroid/os/Parcel;)Lkotlin/uuid/Uuid; public fun equals (Ljava/lang/Object;)Z @@ -49,3 +44,8 @@ public final class kotlinx/uuid/internal/UuidParceler : kotlinx/parcelize/Parcel public fun write (Lkotlin/uuid/Uuid;Landroid/os/Parcel;I)V } +public final class app/softwork/uuid/Uuidv7Kt { + public static final fun Uuidv7 (JLkotlin/random/Random;)Lkotlin/uuid/Uuid; + public static final fun getUnixTimeStamp (Lkotlin/uuid/Uuid;)J +} + diff --git a/kotlinx-uuid-core/api/jvm/kotlinx-uuid-core.api b/kotlinx-uuid-core/api/jvm/kotlinx-uuid-core.api index 2597f01..634187e 100644 --- a/kotlinx-uuid-core/api/jvm/kotlinx-uuid-core.api +++ b/kotlinx-uuid-core/api/jvm/kotlinx-uuid-core.api @@ -1,5 +1,5 @@ -public final class kotlinx/uuid/BinarySerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lkotlinx/uuid/BinarySerializer; +public final class app/softwork/uuid/BinarySerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lapp/softwork/uuid/BinarySerializer; public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lkotlin/uuid/Uuid; public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; @@ -7,27 +7,22 @@ public final class kotlinx/uuid/BinarySerializer : kotlinx/serialization/KSerial public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lkotlin/uuid/Uuid;)V } -public final class kotlinx/uuid/ConvertingKt { +public final class app/softwork/uuid/ConvertingKt { public static final fun toJavaUUID (Lkotlin/uuid/Uuid;)Ljava/util/UUID; public static final fun toKotlinUuid (Ljava/util/UUID;)Lkotlin/uuid/Uuid; } -public final class kotlinx/uuid/NameBasedGeneratorKt { - public static final fun generateUUID (Lkotlin/uuid/Uuid$Companion;Lkotlin/uuid/Uuid;Ljava/lang/String;)Lkotlin/uuid/Uuid; - public static final fun generateUUID (Lkotlin/uuid/Uuid$Companion;[B)Lkotlin/uuid/Uuid; +public final class app/softwork/uuid/NameBasedGeneratorKt { + public static final fun generateUuid (Lkotlin/uuid/Uuid$Companion;Lkotlin/uuid/Uuid;Ljava/lang/String;)Lkotlin/uuid/Uuid; + public static final fun generateUuid (Lkotlin/uuid/Uuid$Companion;[B)Lkotlin/uuid/Uuid; } -public final class kotlinx/uuid/RandomGeneratorKt { +public final class app/softwork/uuid/RandomGeneratorKt { public static final fun nextUuid (Lkotlin/random/Random;)Lkotlin/uuid/Uuid; public static final fun random (Lkotlin/uuid/Uuid$Companion;Lkotlin/random/Random;)Lkotlin/uuid/Uuid; } -public final class kotlinx/uuid/UUID7Kt { - public static final fun UUIDv7 (JLkotlin/random/Random;)Lkotlin/uuid/Uuid; - public static final fun getUnixTimeStamp (Lkotlin/uuid/Uuid;)J -} - -public final class kotlinx/uuid/UUIDKt { +public final class app/softwork/uuid/UuidKt { public static final fun from (Lkotlin/uuid/Uuid$Companion;IJIJI)Lkotlin/uuid/Uuid; public static synthetic fun from$default (Lkotlin/uuid/Uuid$Companion;IJIJIILjava/lang/Object;)Lkotlin/uuid/Uuid; public static final fun getClockSequence (Lkotlin/uuid/Uuid;)I @@ -36,8 +31,13 @@ public final class kotlinx/uuid/UUIDKt { public static final fun getVariant (Lkotlin/uuid/Uuid;)I public static final fun getVersionNumber (Lkotlin/uuid/Uuid;)I public static final fun isRfcVariant (Lkotlin/uuid/Uuid;)Z - public static final fun isValidUUIDString (Lkotlin/uuid/Uuid$Companion;Ljava/lang/String;)Z - public static final fun toUUIDOrNull (Ljava/lang/String;)Lkotlin/uuid/Uuid; + public static final fun isValidUuidString (Lkotlin/uuid/Uuid$Companion;Ljava/lang/String;)Z public static final fun toUuid (Ljava/lang/String;)Lkotlin/uuid/Uuid; + public static final fun toUuidOrNull (Ljava/lang/String;)Lkotlin/uuid/Uuid; +} + +public final class app/softwork/uuid/Uuidv7Kt { + public static final fun Uuidv7 (JLkotlin/random/Random;)Lkotlin/uuid/Uuid; + public static final fun getUnixTimeStamp (Lkotlin/uuid/Uuid;)J } diff --git a/kotlinx-uuid-core/build.gradle.kts b/kotlinx-uuid-core/build.gradle.kts index 3d9e3f8..55b985e 100644 --- a/kotlinx-uuid-core/build.gradle.kts +++ b/kotlinx-uuid-core/build.gradle.kts @@ -34,7 +34,7 @@ kotlin { } android { - namespace = "kotlinx.uuid" + namespace = "app.softwork.uuid" compileSdk = 34 defaultConfig { diff --git a/kotlinx-uuid-core/src/androidInstrumentedTest/kotlin/kotlinx/uuid/internal/ParcelableTest.kt b/kotlinx-uuid-core/src/androidInstrumentedTest/kotlin/app/softwork/uuid/internal/ParcelableTest.kt similarity index 93% rename from kotlinx-uuid-core/src/androidInstrumentedTest/kotlin/kotlinx/uuid/internal/ParcelableTest.kt rename to kotlinx-uuid-core/src/androidInstrumentedTest/kotlin/app/softwork/uuid/internal/ParcelableTest.kt index d0abea6..a83a8da 100644 --- a/kotlinx-uuid-core/src/androidInstrumentedTest/kotlin/kotlinx/uuid/internal/ParcelableTest.kt +++ b/kotlinx-uuid-core/src/androidInstrumentedTest/kotlin/app/softwork/uuid/internal/ParcelableTest.kt @@ -1,11 +1,11 @@ -package kotlinx.uuid.internal +package app.softwork.uuid.internal import android.os.Parcel import android.os.Parcelable +import app.softwork.uuid.* import kotlinx.parcelize.Parcelize import kotlinx.parcelize.TypeParceler import kotlinx.parcelize.parcelableCreator -import kotlinx.uuid.* import kotlin.test.* import kotlin.uuid.Uuid diff --git a/kotlinx-uuid-core/src/androidMain/kotlin/kotlinx/uuid/internal/UuidParceler.kt b/kotlinx-uuid-core/src/androidMain/kotlin/app/softwork/uuid/UuidParceler.kt similarity index 94% rename from kotlinx-uuid-core/src/androidMain/kotlin/kotlinx/uuid/internal/UuidParceler.kt rename to kotlinx-uuid-core/src/androidMain/kotlin/app/softwork/uuid/UuidParceler.kt index 46b102f..e9b662f 100644 --- a/kotlinx-uuid-core/src/androidMain/kotlin/kotlinx/uuid/internal/UuidParceler.kt +++ b/kotlinx-uuid-core/src/androidMain/kotlin/app/softwork/uuid/UuidParceler.kt @@ -1,4 +1,4 @@ -package kotlinx.uuid.internal +package app.softwork.uuid import android.os.Parcel import kotlinx.parcelize.Parceler diff --git a/kotlinx-uuid-core/src/appleMain/kotlin/app/softwork/uuid/Converter.kt b/kotlinx-uuid-core/src/appleMain/kotlin/app/softwork/uuid/Converter.kt new file mode 100644 index 0000000..dd9acdf --- /dev/null +++ b/kotlinx-uuid-core/src/appleMain/kotlin/app/softwork/uuid/Converter.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2020-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. + */ + +package app.softwork.uuid + +import platform.Foundation.NSUUID +import kotlin.uuid.Uuid + +/** + * Converts this [NSUUID] value to a [Uuid] value + * by using the [UUIDString](platform.Foundation.NSUUID.UUIDString) representation. + */ +public fun NSUUID.toKotlinUuid(): Uuid = Uuid.parse(UUIDString) + +/** + * Converts this [Uuid] value to a [NSUUID] value + * by using the default [kotlin.uuid.Uuid.toString] representation. + */ +public fun Uuid.toNsUUID(): NSUUID = NSUUID(toString()) diff --git a/kotlinx-uuid-core/src/appleMain/kotlin/kotlinx/uuid/Converter.kt b/kotlinx-uuid-core/src/appleMain/kotlin/kotlinx/uuid/Converter.kt deleted file mode 100644 index 2121eae..0000000 --- a/kotlinx-uuid-core/src/appleMain/kotlin/kotlinx/uuid/Converter.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2020-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. - */ - -package kotlinx.uuid - -import kotlin.uuid.Uuid - -/** - * Converts this [platform.Foundation.NSUUID][platform.Foundation.NSUUID] value to a [kotlin.uuid.UUID][Uuid] value - * by using the [UUIDString][platform.Foundation.NSUUID.UUIDString] representation. - */ -public fun platform.Foundation.NSUUID.toKotlinUuid(): Uuid = Uuid.parse(UUIDString) - -/** - * Converts this [kotlin.uuid.Uuid][Uuid] value to a [platform.Foundation.NSUUID][platform.Foundation.NSUUID] value - * by using the default [toString] representation. - */ -public fun Uuid.toNsUUID(): platform.Foundation.NSUUID = platform.Foundation.NSUUID(toString()) diff --git a/kotlinx-uuid-core/src/appleTest/kotlin/kotlinx/uuid/NsUUIDConvertingTest.kt b/kotlinx-uuid-core/src/appleTest/kotlin/app/softwork/uuid/NsUUIDConvertingTest.kt similarity index 96% rename from kotlinx-uuid-core/src/appleTest/kotlin/kotlinx/uuid/NsUUIDConvertingTest.kt rename to kotlinx-uuid-core/src/appleTest/kotlin/app/softwork/uuid/NsUUIDConvertingTest.kt index 6bad1d6..5494cf7 100644 --- a/kotlinx-uuid-core/src/appleTest/kotlin/kotlinx/uuid/NsUUIDConvertingTest.kt +++ b/kotlinx-uuid-core/src/appleTest/kotlin/app/softwork/uuid/NsUUIDConvertingTest.kt @@ -6,7 +6,7 @@ * Copyright 2020-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ -package kotlinx.uuid +package app.softwork.uuid import kotlin.test.* import kotlin.uuid.Uuid diff --git a/kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/BinarySerializer.kt b/kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/BinarySerializer.kt similarity index 86% rename from kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/BinarySerializer.kt rename to kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/BinarySerializer.kt index 52a08c1..35ce1ca 100644 --- a/kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/BinarySerializer.kt +++ b/kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/BinarySerializer.kt @@ -2,7 +2,7 @@ * Copyright 2020-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ -package kotlinx.uuid +package app.softwork.uuid import kotlinx.serialization.* import kotlinx.serialization.builtins.* @@ -13,9 +13,9 @@ import kotlin.uuid.Uuid /** * This serializer is useful with binary formats to reduce size. You may also use it with * text formats like json, but it is not that useful (because there will be no size gain) - * and a serialized UUID is not human-readable. + * and a serialized Uuid is not human-readable. * - * With this serializer, a UUID is represented as an array of long with two elements. + * With this serializer, a Uuid is represented as an array of long with two elements. * * Example: * ```kotlin @@ -35,7 +35,7 @@ public object BinarySerializer : KSerializer { override fun deserialize(decoder: Decoder): Uuid { return decoder.decodeSerializableValue(serializer).let { array -> if (array.size != 2) { - throw SerializationException("UUID array should consist of 2 elements") + throw SerializationException("Uuid array should consist of 2 elements") } Uuid.fromLongs(array[0], array[1]) diff --git a/kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/NameBasedGenerator.kt b/kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/NameBasedGenerator.kt similarity index 75% rename from kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/NameBasedGenerator.kt rename to kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/NameBasedGenerator.kt index 5a80b14..a506765 100644 --- a/kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/NameBasedGenerator.kt +++ b/kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/NameBasedGenerator.kt @@ -2,9 +2,9 @@ * Copyright 2020-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ -package kotlinx.uuid +package app.softwork.uuid -import kotlinx.uuid.internal.* +import app.softwork.uuid.internal.* import kotlin.experimental.* import kotlin.uuid.Uuid @@ -15,13 +15,13 @@ import kotlin.uuid.Uuid * * See [RFC4122 sec 4.3](https://tools.ietf.org/html/rfc4122#section-4.3) */ -public fun Uuid.Companion.generateUUID(namespace: Uuid, name: String): Uuid { +public fun Uuid.Companion.generateUuid(namespace: Uuid, name: String): Uuid { val hash = sha1 { update(namespace.toByteArray()) update(name.encodeToByteArray()) } - return generateUUIDByHash(hash, version = 5) + return generateUuidByHash(hash, version = 5) } /** @@ -31,15 +31,15 @@ public fun Uuid.Companion.generateUUID(namespace: Uuid, name: String): Uuid { * * See [RFC4122 sec 4.3](https://tools.ietf.org/html/rfc4122#section-4.3) * - * It is recommended to use generateUUID(namespace, name) instead while this function + * It is recommended to use generateUuid(namespace, name) instead while this function * is more for java.util.UUID parity. */ -public fun Uuid.Companion.generateUUID(bytes: ByteArray): Uuid { +public fun Uuid.Companion.generateUuid(bytes: ByteArray): Uuid { val hash = sha1 { update(bytes) } - return generateUUIDByHash(hash, version = 5) + return generateUuidByHash(hash, version = 5) } private inline fun sha1(builder: SHA1.() -> Unit): ByteArray { @@ -48,7 +48,7 @@ private inline fun sha1(builder: SHA1.() -> Unit): ByteArray { return sha1.final() } -private fun generateUUIDByHash(hashBytes: ByteArray, version: Int): Uuid { +private fun generateUuidByHash(hashBytes: ByteArray, version: Int): Uuid { hashBytes[6] = (hashBytes[6] and 0x0f or (version shl 4).toByte()) hashBytes[8] = hashBytes[8] and 0x3f or 0x80.toByte() diff --git a/kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/RandomGenerator.kt b/kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/RandomGenerator.kt similarity index 85% rename from kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/RandomGenerator.kt rename to kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/RandomGenerator.kt index 027490c..3f90b19 100644 --- a/kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/RandomGenerator.kt +++ b/kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/RandomGenerator.kt @@ -2,13 +2,13 @@ * Copyright 2020-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ -package kotlinx.uuid +package app.softwork.uuid import kotlin.random.* import kotlin.uuid.Uuid /** - * Generates a random UUID v4 using the specified [random] source. + * Generates a random Uuid v4 using the specified [random] source. */ public fun Uuid.Companion.random(random: Random): Uuid { val randomBytes = random.nextBytes(16) @@ -29,6 +29,6 @@ private fun uuidFromRandomBytes(randomBytes: ByteArray): Uuid { } /** - * Generates a random UUID v4 using this [Random] instance. + * Generates a random Uuid v4 using this [Random] instance. */ public fun Random.nextUuid(): Uuid = Uuid.random(this) diff --git a/kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/UUID.kt b/kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/Uuid.kt similarity index 80% rename from kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/UUID.kt rename to kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/Uuid.kt index 26a9768..f2a74ec 100644 --- a/kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/UUID.kt +++ b/kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/Uuid.kt @@ -2,7 +2,7 @@ * Copyright 2020-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ -package kotlinx.uuid +package app.softwork.uuid import kotlin.uuid.Uuid @@ -31,7 +31,7 @@ public fun Uuid.Companion.from( } /** - * A 60-bits non-negative number. Depending on the UUID version it could have different semantics: + * A 60-bits non-negative number. Depending on the Uuid version it could have different semantics: * - UTC time * - a number constructed from the namespace * - a random number @@ -45,13 +45,13 @@ public val Uuid.timeStamp: Long /** * 13-bits non-negative number representing a sequence number - * or a random number depending on UUID [version] and [variant]. + * or a random number depending on Uuid [version] and [variant]. */ public val Uuid.clockSequence: Int get() = toLongs { _, clockSequenceVariantAndNodeRaw -> (clockSequenceVariantAndNodeRaw shr 48 and 0x1fff).toInt() } /** - * UUID [numeric version](https://tools.ietf.org/html/rfc4122#section-4.1.3) in range `[0..15] + * Uuid [numeric version](https://tools.ietf.org/html/rfc4122#section-4.1.3) in range `[0..15] */ public val Uuid.versionNumber: Int get() = toLongs { timeStampAndVersionRaw, _ -> @@ -59,7 +59,7 @@ public val Uuid.versionNumber: Int } /** - * UUID variant in range `[0..7]`, similar to version + * Uuid variant in range `[0..7]`, similar to version */ public val Uuid.variant: Int get() = toLongs { _, clockSequenceVariantAndNodeRaw -> @@ -67,12 +67,12 @@ public val Uuid.variant: Int } /** - * UUID variant specified and documented by the RFC + * Uuid variant specified and documented by the RFC */ public val Uuid.isRfcVariant: Boolean get() = variant == 4 || variant == 5 /** - * Node UUID part, a 48-bit non-negative number. + * Node Uuid part, a 48-bit non-negative number. * Depending on [version] and [variant] it could be one of the following: * - a MAC address * - a random number @@ -82,10 +82,10 @@ public val Uuid.node: Long get() = toLongs { _, clockSequenceVariantAndNodeRaw -> clockSequenceVariantAndNodeRaw and 0xffffffffffffL } /** - * Check the [spec] string to conform to UUID - * @return `true` if the [spec] string is a UUID string + * Check the [spec] string to conform to Uuid + * @return `true` if the [spec] string is a Uuid string */ -public fun Uuid.Companion.isValidUUIDString(spec: String): Boolean = try { +public fun Uuid.Companion.isValidUuidString(spec: String): Boolean = try { parse(spec) true } catch (_: IllegalArgumentException) { @@ -93,14 +93,14 @@ public fun Uuid.Companion.isValidUUIDString(spec: String): Boolean = try { } /** - * Convert this String to a [Uuid], or throws a [IllegalArgumentException] if [this] is a malformed UUID. + * Convert this String to a [Uuid], or throws a [IllegalArgumentException] if [this] is a malformed Uuid. */ public fun String.toUuid(): Uuid = Uuid.parse(this) /** - * Convert this String to a [Uuid], or returns null if [this] is a malformed UUID. + * Convert this String to a [Uuid], or returns null if [this] is a malformed Uuid. */ -public fun String.toUUIDOrNull(): Uuid? = try { +public fun String.toUuidOrNull(): Uuid? = try { Uuid.parse(this) } catch (_: IllegalArgumentException) { null diff --git a/kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/Uuidv7.kt b/kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/Uuidv7.kt new file mode 100644 index 0000000..644cf5e --- /dev/null +++ b/kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/Uuidv7.kt @@ -0,0 +1,36 @@ +package app.softwork.uuid + +import kotlin.random.Random +import kotlin.uuid.Uuid + +private const val UNIX_48_TIMESTAMP = 0x1FFF_FFFF_FFFF_FL + +/** + * An Uuidv7 implementation according to the + * [draft](https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis#section-5.7). + * + * [timeStamp] must be an 48 bit unix timestamp. + */ +public fun Uuidv7(timeStamp: Long, random: Random): Uuid { + require(timeStamp <= UNIX_48_TIMESTAMP) { + "timeStamp $timeStamp must be <= 48 bits, was $timeStamp." + } + val value = random.nextBytes(Uuid.SIZE_BYTES) + + value[0] = ((timeStamp shr 40) and 0xFF).toByte() + value[1] = ((timeStamp shr 32) and 0xFF).toByte() + value[2] = ((timeStamp shr 24) and 0xFF).toByte() + value[3] = ((timeStamp shr 16) and 0xFF).toByte() + value[4] = ((timeStamp shr 8) and 0xFF).toByte() + value[5] = (timeStamp and 0xFF).toByte() + + value[6] = (value[6].toInt() and 0x0F or 0x70).toByte() + value[8] = (value[8].toInt() and 0x3F or 0x80).toByte() + + return Uuid.fromByteArray(value) +} + +/** + * The Uuidv7 48 bit big-endian unsigned number of Unix epoch timestamp in milliseconds + */ +public val Uuid.unixTimeStamp: Long get() = toLongs { mostSignificantBits, _ -> mostSignificantBits ushr 16 } diff --git a/kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/internal/SHA1.kt b/kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/internal/SHA1.kt similarity index 99% rename from kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/internal/SHA1.kt rename to kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/internal/SHA1.kt index 2b738b4..26095bc 100644 --- a/kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/internal/SHA1.kt +++ b/kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/internal/SHA1.kt @@ -2,7 +2,7 @@ * Copyright 2020-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ -package kotlinx.uuid.internal +package app.softwork.uuid.internal /** * This is a simple Kotlin SHA-1 implementation based on wiki's description. diff --git a/kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/UUID7.kt b/kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/UUID7.kt deleted file mode 100644 index d83a4bd..0000000 --- a/kotlinx-uuid-core/src/commonMain/kotlin/kotlinx/uuid/UUID7.kt +++ /dev/null @@ -1,42 +0,0 @@ -package kotlinx.uuid - -import kotlin.random.Random -import kotlin.uuid.Uuid - -private const val UNIX_48_TIMESTAMP = 0x1FFF_FFFF_FFFF_FL - -/** - * An UUIDv7 implementation according to the - * [draft](https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis#section-5.7). - * - * [timeStamp] must be an 48 bit unix timestamp. - */ -public fun UUIDv7(timeStamp: Long, random: Random): Uuid { - require(timeStamp <= UNIX_48_TIMESTAMP) { - "timeStamp $timeStamp must be <= 48 bits, was $timeStamp." - } - val ( - helperTimeStampAndVersionRaw, - helperClockSequenceVariantAndNodeRaw - ) = random.nextUuid().toLongs { mostSignificantBits, leastSignificantBits -> - mostSignificantBits to leastSignificantBits - } - val leftTimeStamp = timeStamp shl 16 - // set version to 0b0111 - val leftTimeStampAndVersion = leftTimeStamp or 28672 - val randA = helperTimeStampAndVersionRaw.let { timeStampAndVersionRaw -> - (timeStampAndVersionRaw ushr 32) or - (timeStampAndVersionRaw and 0xffff0000L shl 16) or - (timeStampAndVersionRaw and 0x0fffL shl 48) - } and 4095 - val timeStampAndVersionRaw = leftTimeStampAndVersion or randA - // set variant to 0b10 - val clockSequenceVariantAndNodeRaw = (2L shl 62) or (helperClockSequenceVariantAndNodeRaw ushr 2) - - return Uuid.fromLongs(timeStampAndVersionRaw, clockSequenceVariantAndNodeRaw) -} - -/** - * The UUIDv7 48 bit big-endian unsigned number of Unix epoch timestamp in milliseconds - */ -public val Uuid.unixTimeStamp: Long get() = toLongs { mostSignificantBits, _ -> mostSignificantBits ushr 16 } diff --git a/kotlinx-uuid-core/src/commonTest/kotlin/kotlinx/uuid/BinarySerializationTest.kt b/kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/BinarySerializationTest.kt similarity index 98% rename from kotlinx-uuid-core/src/commonTest/kotlin/kotlinx/uuid/BinarySerializationTest.kt rename to kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/BinarySerializationTest.kt index 2d38b76..3422ea7 100644 --- a/kotlinx-uuid-core/src/commonTest/kotlin/kotlinx/uuid/BinarySerializationTest.kt +++ b/kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/BinarySerializationTest.kt @@ -2,7 +2,7 @@ * Copyright 2020-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ -package kotlinx.uuid +package app.softwork.uuid import kotlinx.serialization.* import kotlinx.serialization.cbor.* diff --git a/kotlinx-uuid-core/src/commonTest/kotlin/kotlinx/uuid/GenerationTest.kt b/kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/GenerationTest.kt similarity index 87% rename from kotlinx-uuid-core/src/commonTest/kotlin/kotlinx/uuid/GenerationTest.kt rename to kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/GenerationTest.kt index 5f53d2e..6d127c5 100644 --- a/kotlinx-uuid-core/src/commonTest/kotlin/kotlinx/uuid/GenerationTest.kt +++ b/kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/GenerationTest.kt @@ -2,7 +2,7 @@ * Copyright 2020-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ -package kotlinx.uuid +package app.softwork.uuid import kotlin.random.* import kotlin.test.* @@ -29,15 +29,15 @@ class GenerationTest { @Test fun testGenerateFromName() { - val baseUUID = Uuid.parse(SOME_UUID_STRING) - val generated = Uuid.generateUUID(baseUUID, "test") + val baseUuid = Uuid.parse(SOME_UUID_STRING) + val generated = Uuid.generateUuid(baseUuid, "test") assertEquals(5, generated.versionNumber) assertEquals("9dc3df60-4ed1-5ea9-9e66-5c2030d5827b", generated.toString()) } @Test fun testGenerateFromBytes() { - val generated = Uuid.generateUUID(SOME_UUID_STRING.explodeToBytes().toByteArray()) + val generated = Uuid.generateUuid(SOME_UUID_STRING.explodeToBytes().toByteArray()) assertEquals(5, generated.versionNumber) assertEquals("29e5befd-ca93-58bf-9ef0-30f7da112935", generated.toString()) } diff --git a/kotlinx-uuid-core/src/commonTest/kotlin/kotlinx/uuid/SHA1Test.kt b/kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/SHA1Test.kt similarity index 97% rename from kotlinx-uuid-core/src/commonTest/kotlin/kotlinx/uuid/SHA1Test.kt rename to kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/SHA1Test.kt index e79e26e..5ec7768 100644 --- a/kotlinx-uuid-core/src/commonTest/kotlin/kotlinx/uuid/SHA1Test.kt +++ b/kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/SHA1Test.kt @@ -2,9 +2,9 @@ * Copyright 2020-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ -package kotlinx.uuid +package app.softwork.uuid -import kotlinx.uuid.internal.* +import app.softwork.uuid.internal.* import kotlin.test.* class SHA1Test { diff --git a/kotlinx-uuid-core/src/commonTest/kotlin/kotlinx/uuid/UUIDTest.kt b/kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/UuidTest.kt similarity index 93% rename from kotlinx-uuid-core/src/commonTest/kotlin/kotlinx/uuid/UUIDTest.kt rename to kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/UuidTest.kt index 50c4275..2bd49cd 100644 --- a/kotlinx-uuid-core/src/commonTest/kotlin/kotlinx/uuid/UUIDTest.kt +++ b/kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/UuidTest.kt @@ -2,7 +2,7 @@ * Copyright 2020-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ -package kotlinx.uuid +package app.softwork.uuid import kotlin.random.Random import kotlin.test.* @@ -12,7 +12,7 @@ private const val UUID_STRING_ALL_FF: String = "ffffffff-ffff-ffff-ffff-ffffffff private const val UUID_STRING: String = "1b3e4567-e99b-13d3-a476-446657420000" internal const val SOME_UUID_STRING: String = "1b3e4567-e99b-13d3-a476-446657420000" -class UUIDTest { +class UuidTest { @Test fun testZero() { assertEquals(0, Uuid.NIL.variant) @@ -34,7 +34,7 @@ class UUIDTest { assertEquals("446657420000", uuid.node.toString(16)) assertEquals(uuid, UUID_STRING.toUuid()) - assertEquals(uuid, UUID_STRING.toUUIDOrNull()) + assertEquals(uuid, UUID_STRING.toUuidOrNull()) } @Test @@ -152,12 +152,12 @@ class UUIDTest { @Test fun testIsValidString() { - assertTrue(Uuid.isValidUUIDString(SOME_UUID_STRING)) + assertTrue(Uuid.isValidUuidString(SOME_UUID_STRING)) - assertFalse(Uuid.isValidUUIDString(SOME_UUID_STRING.drop(1))) - assertFalse(Uuid.isValidUUIDString(SOME_UUID_STRING.dropLast(1))) - assertFalse(Uuid.isValidUUIDString(SOME_UUID_STRING.replace('b', 'X'))) - assertNull(SOME_UUID_STRING.drop(1).toUUIDOrNull()) + assertFalse(Uuid.isValidUuidString(SOME_UUID_STRING.drop(1))) + assertFalse(Uuid.isValidUuidString(SOME_UUID_STRING.dropLast(1))) + assertFalse(Uuid.isValidUuidString(SOME_UUID_STRING.replace('b', 'X'))) + assertNull(SOME_UUID_STRING.drop(1).toUuidOrNull()) } @Test diff --git a/kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/Uuidv7Test.kt b/kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/Uuidv7Test.kt new file mode 100644 index 0000000..4cac0e0 --- /dev/null +++ b/kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/Uuidv7Test.kt @@ -0,0 +1,16 @@ +package app.softwork.uuid + +import kotlin.random.Random +import kotlin.test.* + +class Uuidv7Test { + @Test + fun test() { + val uuid = Uuidv7(1645557742000, random = Random(4242)) + + assertEquals(1645557742000, uuid.unixTimeStamp) + assertEquals("017f22e2-79b0-7a1e-ad73-08cd2f61d78a", uuid.toString()) + assertEquals(7, uuid.versionNumber) + assertEquals(5, uuid.variant) + } +} diff --git a/kotlinx-uuid-core/src/commonTest/kotlin/kotlinx/uuid/UUIDv7Test.kt b/kotlinx-uuid-core/src/commonTest/kotlin/kotlinx/uuid/UUIDv7Test.kt deleted file mode 100644 index b815a2b..0000000 --- a/kotlinx-uuid-core/src/commonTest/kotlin/kotlinx/uuid/UUIDv7Test.kt +++ /dev/null @@ -1,18 +0,0 @@ -package kotlinx.uuid - -import kotlin.random.Random -import kotlin.test.* - -class UUIDv7Test { - @Test - fun test() { - val one = UUIDv7(0x17F22E279B0, random = Random(4242)) - val two = UUIDv7(1645557742000, random = Random(4242)) - assertEquals(one, two) - - assertEquals(1645557742000, one.unixTimeStamp) - assertEquals(1645557742000, two.unixTimeStamp) - assertEquals("017f22e2-79b0-7b35-ab5c-c2334bd875e2", one.toString()) - assertEquals(7, one.versionNumber) - } -} diff --git a/kotlinx-uuid-core/src/jvmMain/kotlin/app/softwork/uuid/Converting.kt b/kotlinx-uuid-core/src/jvmMain/kotlin/app/softwork/uuid/Converting.kt new file mode 100644 index 0000000..d6f772a --- /dev/null +++ b/kotlinx-uuid-core/src/jvmMain/kotlin/app/softwork/uuid/Converting.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2020-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. + */ + +package app.softwork.uuid + +import java.util.* +import kotlin.uuid.Uuid + +/** + * Converts this [UUID] value to a [Uuid] value + * by using the default [java.util.UUID.toString] representation. + */ +public fun UUID.toKotlinUuid(): Uuid = Uuid.parse(toString()) + +/** + * Converts this [Uuid] value to a [Uuid] value + * by using the default [kotlin.uuid.Uuid.toString] representation. + */ +public fun Uuid.toJavaUUID(): UUID = UUID.fromString(toString()) diff --git a/kotlinx-uuid-core/src/jvmMain/kotlin/kotlinx/uuid/Converting.kt b/kotlinx-uuid-core/src/jvmMain/kotlin/kotlinx/uuid/Converting.kt deleted file mode 100644 index 9d18af4..0000000 --- a/kotlinx-uuid-core/src/jvmMain/kotlin/kotlinx/uuid/Converting.kt +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2020-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. - */ - -package kotlinx.uuid -import kotlin.uuid.Uuid - -/** - * Converts this [java.util.UUID][java.util.UUID] value to a [kotlin.uuid.Uuid][Uuid] value - * by using the default [toString] representation. - */ -public fun java.util.UUID.toKotlinUuid(): Uuid = Uuid.parse(toString()) - -/** - * Converts this [kotlin.uuid.Uuid][Uuid] value to a [java.util.UUID][java.util.UUID] value - * by using the default [toString] representation. - */ -public fun Uuid.toJavaUUID(): java.util.UUID = java.util.UUID.fromString(toString()) diff --git a/kotlinx-uuid-core/src/jvmTest/kotlin/kotlinx/uuid/JavaConvertingTest.kt b/kotlinx-uuid-core/src/jvmTest/kotlin/app/softwork/uuid/JavaConvertingTest.kt similarity index 96% rename from kotlinx-uuid-core/src/jvmTest/kotlin/kotlinx/uuid/JavaConvertingTest.kt rename to kotlinx-uuid-core/src/jvmTest/kotlin/app/softwork/uuid/JavaConvertingTest.kt index c51da11..2ae0db2 100644 --- a/kotlinx-uuid-core/src/jvmTest/kotlin/kotlinx/uuid/JavaConvertingTest.kt +++ b/kotlinx-uuid-core/src/jvmTest/kotlin/app/softwork/uuid/JavaConvertingTest.kt @@ -2,7 +2,7 @@ * Copyright 2020-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ -package kotlinx.uuid +package app.softwork.uuid import kotlin.test.* import kotlin.uuid.Uuid diff --git a/kotlinx-uuid-core/src/jvmTest/kotlin/kotlinx/uuid/JavaSpecificTests.kt b/kotlinx-uuid-core/src/jvmTest/kotlin/app/softwork/uuid/JavaSpecificTests.kt similarity index 94% rename from kotlinx-uuid-core/src/jvmTest/kotlin/kotlinx/uuid/JavaSpecificTests.kt rename to kotlinx-uuid-core/src/jvmTest/kotlin/app/softwork/uuid/JavaSpecificTests.kt index cba2f8b..06b249d 100644 --- a/kotlinx-uuid-core/src/jvmTest/kotlin/kotlinx/uuid/JavaSpecificTests.kt +++ b/kotlinx-uuid-core/src/jvmTest/kotlin/app/softwork/uuid/JavaSpecificTests.kt @@ -2,7 +2,7 @@ * Copyright 2020-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ -package kotlinx.uuid +package app.softwork.uuid import java.security.* import kotlin.random.* diff --git a/kotlinx-uuid-datetime/README.md b/kotlinx-uuid-datetime/README.md index 6100275..09a7884 100644 --- a/kotlinx-uuid-datetime/README.md +++ b/kotlinx-uuid-datetime/README.md @@ -8,10 +8,10 @@ dependencies { } ``` -UUIDv7 with the current timestamp using `Clock.System` and default SecureRandom can be created using: +UUIDv7 with the current timestamp using `Clock.System` can be created using: ```kotlin -val uuid = UUIDv7() +val uuid = UUIDv7(random = Random) ``` When processing existing UUIDv7s, the timestamp bits can be interpreted as an Instant with millisecond precision using: diff --git a/kotlinx-uuid-datetime/api/kotlinx-uuid-datetime.api b/kotlinx-uuid-datetime/api/kotlinx-uuid-datetime.api index 44bd723..fcd5567 100644 --- a/kotlinx-uuid-datetime/api/kotlinx-uuid-datetime.api +++ b/kotlinx-uuid-datetime/api/kotlinx-uuid-datetime.api @@ -1,6 +1,6 @@ -public final class kotlinx/uuid/datetime/DslKt { - public static final fun UUIDv7 (Lkotlinx/datetime/Instant;Lkotlin/random/Random;)Lkotlin/uuid/Uuid; - public static synthetic fun UUIDv7$default (Lkotlinx/datetime/Instant;Lkotlin/random/Random;ILjava/lang/Object;)Lkotlin/uuid/Uuid; +public final class app/softwork/uuid/datetime/DslKt { + public static final fun Uuidv7 (Lkotlinx/datetime/Instant;Lkotlin/random/Random;)Lkotlin/uuid/Uuid; + public static synthetic fun Uuidv7$default (Lkotlinx/datetime/Instant;Lkotlin/random/Random;ILjava/lang/Object;)Lkotlin/uuid/Uuid; public static final fun getInstant (Lkotlin/uuid/Uuid;)Lkotlinx/datetime/Instant; } diff --git a/kotlinx-uuid-datetime/src/commonMain/kotlin/app/softwork/uuid/datetime/Dsl.kt b/kotlinx-uuid-datetime/src/commonMain/kotlin/app/softwork/uuid/datetime/Dsl.kt new file mode 100644 index 0000000..f4e4cdd --- /dev/null +++ b/kotlinx-uuid-datetime/src/commonMain/kotlin/app/softwork/uuid/datetime/Dsl.kt @@ -0,0 +1,16 @@ +package app.softwork.uuid.datetime + +import app.softwork.uuid.Uuidv7 +import app.softwork.uuid.unixTimeStamp +import kotlinx.datetime.Clock +import kotlinx.datetime.Instant +import kotlin.random.Random +import kotlin.uuid.Uuid + +public fun Uuidv7(timeStamp: Instant = Clock.System.now(), random: Random): Uuid = + Uuidv7(timeStamp = timeStamp.toEpochMilliseconds(), random = random) + +/** + * The Uuidv7 48 bit big-endian unsigned number of Unix epoch timestamp in milliseconds + */ +public val Uuid.instant: Instant get() = Instant.fromEpochMilliseconds(unixTimeStamp) diff --git a/kotlinx-uuid-datetime/src/commonMain/kotlin/kotlinx/uuid/datetime/Dsl.kt b/kotlinx-uuid-datetime/src/commonMain/kotlin/kotlinx/uuid/datetime/Dsl.kt deleted file mode 100644 index 6ee5c2e..0000000 --- a/kotlinx-uuid-datetime/src/commonMain/kotlin/kotlinx/uuid/datetime/Dsl.kt +++ /dev/null @@ -1,16 +0,0 @@ -package kotlinx.uuid.datetime - -import kotlinx.datetime.Clock -import kotlinx.datetime.Instant -import kotlinx.uuid.UUIDv7 -import kotlinx.uuid.unixTimeStamp -import kotlin.random.Random -import kotlin.uuid.Uuid - -public fun UUIDv7(timeStamp: Instant = Clock.System.now(), random: Random): Uuid = - UUIDv7(timeStamp = timeStamp.toEpochMilliseconds(), random = random) - -/** - * The UUIDv7 48 bit big-endian unsigned number of Unix epoch timestamp in milliseconds - */ -public val Uuid.instant: Instant get() = Instant.fromEpochMilliseconds(unixTimeStamp) diff --git a/kotlinx-uuid-datetime/src/commonTest/kotlin/kotlinx/uuid/datetime/InstantTest.kt b/kotlinx-uuid-datetime/src/commonTest/kotlin/app/softwork/uuid/datetime/InstantTest.kt similarity index 64% rename from kotlinx-uuid-datetime/src/commonTest/kotlin/kotlinx/uuid/datetime/InstantTest.kt rename to kotlinx-uuid-datetime/src/commonTest/kotlin/app/softwork/uuid/datetime/InstantTest.kt index d1ecae2..8970cf4 100644 --- a/kotlinx-uuid-datetime/src/commonTest/kotlin/kotlinx/uuid/datetime/InstantTest.kt +++ b/kotlinx-uuid-datetime/src/commonTest/kotlin/app/softwork/uuid/datetime/InstantTest.kt @@ -1,7 +1,7 @@ -package kotlinx.uuid.datetime +package app.softwork.uuid.datetime +import app.softwork.uuid.versionNumber import kotlinx.datetime.Instant -import kotlinx.uuid.versionNumber import kotlin.random.Random import kotlin.test.Test import kotlin.test.assertEquals @@ -11,9 +11,9 @@ class InstantTest { @Test fun testConversionInstant() { val timestamp = Instant.parse("2020-02-20T10:21:42Z") - val uuid = UUIDv7(timeStamp = timestamp, random = Random(4242)) + val uuid = Uuidv7(timeStamp = timestamp, random = Random(4242)) assertEquals(timestamp, uuid.instant) - assertEquals("0170621e-0ef0-7b35-ab5c-c2334bd875e2", uuid.toString()) + assertEquals("0170621e-0ef0-7a1e-ad73-08cd2f61d78a", uuid.toString()) assertEquals(7, uuid.versionNumber) } } diff --git a/kotlinx-uuid-sqldelight/README.md b/kotlinx-uuid-sqldelight/README.md index 96d3556..78c9c09 100644 --- a/kotlinx-uuid-sqldelight/README.md +++ b/kotlinx-uuid-sqldelight/README.md @@ -1,8 +1,8 @@ # Module kotlinx-uuid-sqldelight -SQLDelight uses column adapters for custom types, like this UUID. -`kotlinx-uuid-sqldelight` provides two adapters, a `UUIDStringAdapter` for a `String` and a `ByteArrayAdapter` for -a `ByteArray` representation respectively. +SQLDelight uses column adapters for custom types, like [Uuid](kotlin.uuid.Uuid). +`kotlinx-uuid-sqldelight` provides two adapters, a [UuidStringAdapter](app.softwork.uuid.sqldelight.UuidStringAdapter) for a [String] and a [UuidByteArrayAdapter](app.softwork.uuid.sqldelight.UuidByteArrayAdapter)` for +a [ByteArray] representation respectively. ```kotlin dependencies { diff --git a/kotlinx-uuid-sqldelight/api/kotlinx-uuid-sqldelight.api b/kotlinx-uuid-sqldelight/api/kotlinx-uuid-sqldelight.api index e798bf8..c585ce1 100644 --- a/kotlinx-uuid-sqldelight/api/kotlinx-uuid-sqldelight.api +++ b/kotlinx-uuid-sqldelight/api/kotlinx-uuid-sqldelight.api @@ -1,13 +1,13 @@ -public final class kotlinx/uuid/sqldelight/UuidByteArrayAdapter : app/cash/sqldelight/ColumnAdapter { - public static final field INSTANCE Lkotlinx/uuid/sqldelight/UuidByteArrayAdapter; +public final class app/softwork/uuid/sqldelight/UuidByteArrayAdapter : app/cash/sqldelight/ColumnAdapter { + public static final field INSTANCE Lapp/softwork/uuid/sqldelight/UuidByteArrayAdapter; public synthetic fun decode (Ljava/lang/Object;)Ljava/lang/Object; public fun decode ([B)Lkotlin/uuid/Uuid; public synthetic fun encode (Ljava/lang/Object;)Ljava/lang/Object; public fun encode (Lkotlin/uuid/Uuid;)[B } -public final class kotlinx/uuid/sqldelight/UuidStringAdapter : app/cash/sqldelight/ColumnAdapter { - public static final field INSTANCE Lkotlinx/uuid/sqldelight/UuidStringAdapter; +public final class app/softwork/uuid/sqldelight/UuidStringAdapter : app/cash/sqldelight/ColumnAdapter { + public static final field INSTANCE Lapp/softwork/uuid/sqldelight/UuidStringAdapter; public synthetic fun decode (Ljava/lang/Object;)Ljava/lang/Object; public fun decode (Ljava/lang/String;)Lkotlin/uuid/Uuid; public synthetic fun encode (Ljava/lang/Object;)Ljava/lang/Object; diff --git a/kotlinx-uuid-sqldelight/src/commonMain/kotlin/kotlinx/uuid/sqldelight/UuidByteArrayAdapter.kt b/kotlinx-uuid-sqldelight/src/commonMain/kotlin/app/softwork/uuid/sqldelight/UuidByteArrayAdapter.kt similarity index 88% rename from kotlinx-uuid-sqldelight/src/commonMain/kotlin/kotlinx/uuid/sqldelight/UuidByteArrayAdapter.kt rename to kotlinx-uuid-sqldelight/src/commonMain/kotlin/app/softwork/uuid/sqldelight/UuidByteArrayAdapter.kt index 0322125..00a0eea 100644 --- a/kotlinx-uuid-sqldelight/src/commonMain/kotlin/kotlinx/uuid/sqldelight/UuidByteArrayAdapter.kt +++ b/kotlinx-uuid-sqldelight/src/commonMain/kotlin/app/softwork/uuid/sqldelight/UuidByteArrayAdapter.kt @@ -1,4 +1,4 @@ -package kotlinx.uuid.sqldelight +package app.softwork.uuid.sqldelight import app.cash.sqldelight.* import kotlin.uuid.Uuid diff --git a/kotlinx-uuid-sqldelight/src/commonMain/kotlin/kotlinx/uuid/sqldelight/UuidStringAdapter.kt b/kotlinx-uuid-sqldelight/src/commonMain/kotlin/app/softwork/uuid/sqldelight/UuidStringAdapter.kt similarity index 87% rename from kotlinx-uuid-sqldelight/src/commonMain/kotlin/kotlinx/uuid/sqldelight/UuidStringAdapter.kt rename to kotlinx-uuid-sqldelight/src/commonMain/kotlin/app/softwork/uuid/sqldelight/UuidStringAdapter.kt index 79f30be..cb23d0d 100644 --- a/kotlinx-uuid-sqldelight/src/commonMain/kotlin/kotlinx/uuid/sqldelight/UuidStringAdapter.kt +++ b/kotlinx-uuid-sqldelight/src/commonMain/kotlin/app/softwork/uuid/sqldelight/UuidStringAdapter.kt @@ -1,4 +1,4 @@ -package kotlinx.uuid.sqldelight +package app.softwork.uuid.sqldelight import app.cash.sqldelight.* import kotlin.uuid.Uuid From f7f01f49804420c7f2fd164ab6b619ccd3370219 Mon Sep 17 00:00:00 2001 From: Philip Wedemann <22521688+hfhbd@users.noreply.github.com> Date: Sat, 17 Aug 2024 14:31:33 +0200 Subject: [PATCH 2/2] Bump Gradle to 8.10 (#380) --- gradle/wrapper/gradle-wrapper.jar | Bin 43504 -> 43583 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 2c3521197d7c4586c843d1d3e9090525f1898cde..a4b76b9530d66f5e68d973ea569d8e19de379189 100644 GIT binary patch delta 3990 zcmV;H4{7l5(*nQL0Kr1kzC=_KMxQY0|W5(lc#i zH*M1^P4B}|{x<+fkObwl)u#`$GxKKV&3pg*-y6R6txw)0qU|Clf9Uds3x{_-**c=7 z&*)~RHPM>Rw#Hi1R({;bX|7?J@w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W;%Dmtv%C+0@xVxPE^ zyZzi9P%JAD6ynwHptuzP`Kox7*9h7XSMonCalv;Md0i9Vb-c*!f0ubfk?&T&T}AHh z4m8Bz{JllKcdNg?D^%a5MFQ;#1z|*}H^qHLzW)L}wp?2tY7RejtSh8<;Zw)QGJYUm z|MbTxyj*McKlStlT9I5XlSWtQGN&-LTr2XyNU+`490rg?LYLMRnz-@oKqT1hpCGqP zyRXt4=_Woj$%n5ee<3zhLF>5>`?m9a#xQH+Jk_+|RM8Vi;2*XbK- zEL6sCpaGPzP>k8f4Kh|##_imt#zJMB;ir|JrMPGW`rityK1vHXMLy18%qmMQAm4WZ zP)i30KR&5vs15)C+8dM66&$k~i|ZT;KR&5vs15)C+8dJ(sAmGPijyIz6_bsqKLSFH zlOd=TljEpH0>h4zA*dCTK&emy#FCRCs1=i^sZ9bFmXjf<6_X39E(XY)00000#N437 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 09523c0..9355b41 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME