Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dependency: Update all major dependencies (major) #453

Merged
merged 4 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.jdk }}
distribution: 'adopt'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:
fetch-depth: 2

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: 'java'

- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
env:
GIT_BRANCH: ${{ github.ref }}
GIT_COMMIT: ${{ github.sha }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sponsors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: true

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {

dependencies {
implementation("net.kyori:indra-git:3.1.3")
implementation("com.google.guava:guava:30.1.1-jre")
implementation("com.google.guava:guava:33.3.1-jre")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.21")
}

Expand Down
6 changes: 3 additions & 3 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
object Versions {

// Core
const val JETBRAINS_ANNOTATIONS = "24.1.0"
const val JETBRAINS_ANNOTATIONS = "26.0.1"

// Tests
const val JUNIT_JUPITER = "5.11.2"
Expand All @@ -21,10 +21,10 @@ object Versions {
const val JDA = "5.1.2"

// Minestom
const val MINESTOM = "4305006e6b"
const val MINESTOM = "7320437640"

// Sponge
const val SPONGE_API = "8.2.0"
const val SPONGE_API = "12.0.0"

// Velocity
const val VELOCITY_API = "3.2.0-SNAPSHOT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static <B extends LiteCommandsBuilder<CommandSender, LiteMinestomSettings
.extension(new LiteAdventureExtension<>(), configuration -> configuration
.legacyColor(true)
)
.scheduler(new MinestomScheduler(schedulerManager, new SchedulerExecutorPoolImpl("litecommands-async")))
.scheduler(new MinestomScheduler(schedulerManager))
.argument(Player.class, new PlayerArgument(connectionManager, messageRegistry))
.argument(Instance.class, new InstanceArgument(instanceManager, messageRegistry))
.context(Player.class, new PlayerContext(messageRegistry))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,43 +12,29 @@
public class MinestomScheduler implements Scheduler {

private final SchedulerManager scheduler;
private final Scheduler asyncScheduler;

public MinestomScheduler(SchedulerManager scheduler, Scheduler asyncScheduler) {
public MinestomScheduler(SchedulerManager scheduler) {
this.scheduler = scheduler;
this.asyncScheduler = asyncScheduler;
}

@Override
public <T> CompletableFuture<T> supplyLater(SchedulerPoll type, Duration delay, ThrowingSupplier<T, Throwable> supplier) {
SchedulerPoll poll = type.resolve(SchedulerPoll.MAIN, SchedulerPoll.ASYNCHRONOUS, MinestomSchedulerPoll.TICK_START, MinestomSchedulerPoll.TICK_END);
SchedulerPoll poll = type.resolve(SchedulerPoll.MAIN, SchedulerPoll.ASYNCHRONOUS);
CompletableFuture<T> future = new CompletableFuture<>();

if (poll == SchedulerPoll.MAIN || poll == MinestomSchedulerPoll.TICK_START || poll == MinestomSchedulerPoll.TICK_END) {
Task.Builder built = scheduler.buildTask(() -> tryRun(supplier, future));
Task.Builder built = scheduler.buildTask(() -> tryRun(supplier, future))
.executionType(poll == SchedulerPoll.MAIN ? ExecutionType.SYNC : ExecutionType.ASYNC);

if (!delay.isZero()) {
built.delay(delay);
}

if (poll == MinestomSchedulerPoll.TICK_START) {
built.executionType(ExecutionType.TICK_START);
}

if (poll == MinestomSchedulerPoll.TICK_END) {
built.executionType(ExecutionType.TICK_END);
}

built.schedule();
return future;
if (!delay.isZero()) {
built.delay(delay);
}

return asyncScheduler.supplyLater(SchedulerPoll.ASYNCHRONOUS, delay, supplier);
built.schedule();
return future;
}

@Override
public void shutdown() {

}

private <T> CompletableFuture<T> tryRun(ThrowingSupplier<T, Throwable> supplier, CompletableFuture<T> future) {
Expand Down

This file was deleted.

3 changes: 2 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"dependencyDashboard": true,
"extends": [
"config:base"
],
Expand All @@ -10,7 +11,7 @@
},
"separateMajorMinor": true,
"pruneStaleBranches": true,
"commitMessagePrefix": "[Renovate]",
"commitMessagePrefix": "dependency:",
"packageRules": [
{
"groupName": "all minor and patch dependencies",
Expand Down