diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index faf4905e..7de0a01c 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -18,6 +18,6 @@ jobs: uses: actions/setup-java@v5 with: distribution: temurin - java-version: 21 + java-version: 25 - name: Build on ${{ matrix.os }} run: ./gradlew clean build \ No newline at end of file diff --git a/.github/workflows/main-build.yml b/.github/workflows/main-build.yml index d5a1212e..1c151fc2 100644 --- a/.github/workflows/main-build.yml +++ b/.github/workflows/main-build.yml @@ -25,6 +25,6 @@ jobs: uses: actions/setup-java@v5 with: distribution: temurin - java-version: 21 + java-version: 25 - name: Build on ${{ matrix.os }} run: ./gradlew test \ No newline at end of file diff --git a/.github/workflows/publishing.yaml b/.github/workflows/publishing.yaml index 69ec82ed..0f096c06 100644 --- a/.github/workflows/publishing.yaml +++ b/.github/workflows/publishing.yaml @@ -14,11 +14,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v5 - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@v5 with: distribution: 'temurin' - java-version: '21' + java-version: '25' - name: Build with Gradle run: ./gradlew build - name: Publish to Maven diff --git a/build.gradle.kts b/build.gradle.kts index 2e5cd8ca..7b0c6d65 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,7 +10,7 @@ description = "Aves" java { toolchain { - languageVersion = JavaLanguageVersion.of(21) + languageVersion = JavaLanguageVersion.of(25) } withJavadocJar() withSourcesJar() @@ -37,7 +37,7 @@ dependencies { tasks { compileJava { options.encoding = "UTF-8" - options.release.set(21) + options.release.set(25) } jacocoTestReport { diff --git a/settings.gradle.kts b/settings.gradle.kts index 37147fb0..151cd474 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -21,7 +21,7 @@ dependencyResolutionManagement { } versionCatalogs { create("libs") { - version("bom", "1.4.5") + version("bom", "1.5.0") library("mycelium.bom", "net.onelitefeather", "mycelium-bom").versionRef("bom") library("minestom","net.minestom", "minestom").withoutVersion() library("adventure", "net.kyori", "adventure-text-minimessage").withoutVersion() diff --git a/src/main/java/net/theevilreaper/aves/util/Futures.java b/src/main/java/net/theevilreaper/aves/util/Futures.java index 5801b45f..ecdfe41f 100644 --- a/src/main/java/net/theevilreaper/aves/util/Futures.java +++ b/src/main/java/net/theevilreaper/aves/util/Futures.java @@ -1,12 +1,12 @@ package net.theevilreaper.aves.util; -import it.unimi.dsi.fastutil.booleans.BooleanConsumer; import org.jetbrains.annotations.NotNull; import java.time.Duration; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import java.util.function.Consumer; /** * Taken from ... @@ -33,7 +33,7 @@ private Futures() { * * @return the new CompletionStage */ - public static CompletableFuture thenRunOrTimeout(@NotNull CompletableFuture future, @NotNull Duration timeout, BooleanConsumer action) { + public static CompletableFuture thenRunOrTimeout(@NotNull CompletableFuture future, @NotNull Duration timeout, Consumer action) { final CompletableFuture f = new CompletableFuture<>(); CompletableFuture.delayedExecutor(timeout.toNanos(), TimeUnit.NANOSECONDS).execute(() -> f.complete(true)); future.thenRun(() -> f.complete(false));