Skip to content

Commit

Permalink
Merge branch 'main' into kotlin-2.1.0
Browse files Browse the repository at this point in the history
# Conflicts:
#	gradle/libs.versions.toml
  • Loading branch information
lukellmann committed Sep 6, 2024
2 parents 079a72e + 75caf06 commit 114e23c
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 39 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deployment-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 21
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew --stacktrace --info build
release:
Expand All @@ -54,9 +54,9 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 21
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew --stacktrace --info build
- name: Publish with Gradle
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 21
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Build docs with Gradle
run: ./gradlew --stacktrace --info dokkaHtmlMultiModule
- name: Deploy docs to GitHub Pages
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/gradle-wrapper-validation.yml

This file was deleted.

2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Documentation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fun AbstractDokkaLeafTask.applyKordDokkaOptions() {

dokkaSourceSets.configureEach {

jdkVersion = Jvm.target
jdkVersion = 22

suppressGeneratedFiles = false

Expand Down
15 changes: 8 additions & 7 deletions common/src/commonMain/kotlin/entity/Snowflake.kt
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public class Snowflake : Comparable<Snowflake> {
*
* The comparison is based first on the value of the [timestamp], then on the value of the [workerId], then on the
* value of the [processId] and finally on the value of the [increment]. It is *consistent with equals*, as defined
* by [Comparable](https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html).
* by [Comparable](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/lang/Comparable.html).
*/
override fun compareTo(other: Snowflake): Int {
// the layout of Snowflake values from MSB to LSB is timestamp, workerId, processId, increment,
Expand Down Expand Up @@ -175,12 +175,13 @@ public class Snowflake : Comparable<Snowflake> {
* [processId] and [increment] are not taken into account.
*
* Note: this comparator imposes an ordering that is *inconsistent with equals*, as defined by
* [Comparator](https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html). It therefore shouldn't be
* used to order a [SortedSet](https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html) or
* [SortedMap](https://docs.oracle.com/javase/8/docs/api/java/util/SortedMap.html). This is because
* `TimestampComparator` only compares the first 42 bits of the ULong [value] (comparing the timestamp), whereas
* [equals][Snowflake.equals] compares all the bits of the [value]. `TimestampComparator` can return `0` even if
* [equals][Snowflake.equals] returns `false`, but [equals][Snowflake.equals] only returns `true` if
* [Comparator](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/Comparator.html). It
* therefore shouldn't be used to order a
* [SortedSet](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/SortedSet.html) or
* [SortedMap](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/SortedMap.html). This is
* because `TimestampComparator` only compares the first 42 bits of the ULong [value] (comparing the timestamp),
* whereas [equals][Snowflake.equals] compares all the bits of the [value]. `TimestampComparator` can return `0`
* even if [equals][Snowflake.equals] returns `false`, but [equals][Snowflake.equals] only returns `true` if
* `TimestampComparator` returns `0`.
*/
public val TimestampComparator: Comparator<Snowflake> = Comparator { s1, s2 ->
Expand Down
18 changes: 9 additions & 9 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@
kotlin = "2.1.0-dev-5721" # https://github.com/JetBrains/kotlin
ktor = "2.3.12" # https://github.com/ktorio/ktor
kotlinx-coroutines = "1.8.1" # https://github.com/Kotlin/kotlinx.coroutines
kotlinx-serialization = "1.7.1" # https://github.com/Kotlin/kotlinx.serialization
kotlinx-datetime = "0.6.0" # https://github.com/Kotlin/kotlinx-datetime
kotlinx-serialization = "1.7.2" # https://github.com/Kotlin/kotlinx.serialization
kotlinx-datetime = "0.6.1" # https://github.com/Kotlin/kotlinx-datetime
kord-cache = "0.5.4" # https://github.com/kordlib/cache

# implementation dependencies
kotlin-logging = "7.0.0" # https://github.com/oshai/kotlin-logging
kotlin-logging-old = "3.0.5" # TODO remove after dependency is removed in rest, gateway, voice and core
slf4j = "2.0.13" # https://www.slf4j.org
kotlin-node = "20.14.10-pre.773" # https://github.com/JetBrains/kotlin-wrappers
slf4j = "2.0.16" # https://www.slf4j.org
kotlin-node = "20.14.10-pre.800" # https://github.com/JetBrains/kotlin-wrappers
bignum = "0.3.10" # https://github.com/ionspin/kotlin-multiplatform-bignum
stately = "2.0.7" # https://github.com/touchlab/Stately
stately = "2.1.0" # https://github.com/touchlab/Stately
fastZlib = "2.0.1" # https://github.com/timotejroiko/fast-zlib

# code generation
ksp = "2.0.20-1.0.24" # https://github.com/google/ksp
kotlinpoet = "1.18.1" # https://github.com/square/kotlinpoet

# tests
junit-jupiter = "5.10.3" # https://github.com/junit-team/junit5
junit-platform = "1.10.3"
mockk = "1.13.11" # https://github.com/mockk/mockk
junit-jupiter = "5.11.0" # https://github.com/junit-team/junit5
junit-platform = "1.11.0"
mockk = "1.13.12" # https://github.com/mockk/mockk
kbson = "0.4.0" # https://github.com/mongodb/kbson

# plugins
dokka = "1.9.20" # https://github.com/Kotlin/dokka
kotlinx-atomicfu = "0.25.0" # https://github.com/Kotlin/kotlinx-atomicfu
binary-compatibility-validator = "0.16.2" # https://github.com/Kotlin/binary-compatibility-validator
binary-compatibility-validator = "0.16.3" # https://github.com/Kotlin/binary-compatibility-validator
buildconfig = "5.4.0" # https://github.com/gmazzo/gradle-buildconfig-plugin


Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionSha256Sum=5b9c5eb3f9fc2c94abaea57d90bd78747ca117ddbbf96c859d3741181a12bf2a
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down

0 comments on commit 114e23c

Please sign in to comment.