Skip to content
Draft
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/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: 21
java-version: 25
distribution: 'temurin'

- name: Setup Gradle
Expand Down
13 changes: 13 additions & 0 deletions build-logic/src/main/kotlin/buildlogic.adapter.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ plugins {
id("io.papermc.paperweight.userdev")
}

java {
// Required when we de-sync release option and declared Java versions.
disableAutoTargetJvm()
}

tasks
.withType<JavaCompile>()
.matching { it.name == "compileJava" || it.name == "compileTestJava" }
.configureEach {
// We use Java 21 for most of the pre-existing adapters.
options.release.set(21)
}

repositories {
maven {
name = "Minecraft Libraries"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tasks
val disabledLint = listOf(
"processing", "path", "fallthrough", "serial", "overloads", "this-escape",
)
options.release.set(21)
options.release.set(25)
options.compilerArgs.addAll(listOf("-Xlint:all") + disabledLint.map { "-Xlint:-$it" })
options.isDeprecation = true
options.encoding = "UTF-8"
Expand Down
2 changes: 1 addition & 1 deletion build-logic/src/main/kotlin/buildlogic.common.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ configurations.all {

plugins.withId("java") {
the<JavaPluginExtension>().toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
languageVersion.set(JavaLanguageVersion.of(25))
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/gradle-daemon-jvm.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#This file is generated by updateDaemonJvm
toolchainVersion=21
toolchainVersion=25
15 changes: 8 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
neogradle-userdev = { id = "net.neoforged.gradle.userdev", version.ref = "neogradle" }
sponge-spongegradle = "org.spongepowered.gradle.plugin:2.3.0"
sponge-vanillagradle = { id = "org.spongepowered.gradle.vanilla", version.ref = "sponge-vanillagradle" }
fabric-loom = "net.fabricmc.fabric-loom:1.15.4"

[versions]
kyoriText = "3.0.4"
Expand All @@ -12,10 +13,10 @@ cuiProtocol = "4.0.2"

errorprone = "2.48.0"

fabric-api = "0.141.3+1.21.11"
fabric-api = "0.143.14+26.1"

neogradle = "7.1.20"
neoforge-minecraft = "1.21.11"
neogradle = "7.1.21"
neoforge-minecraft = "26.1"

sponge-minecraft = "1.21.11"
# https://repo.spongepowered.org/service/rest/repository/browse/maven-public/org/spongepowered/spongeapi/
Expand Down Expand Up @@ -74,7 +75,7 @@ junit-platform-launcher.module = "org.junit.platform:junit-platform-launcher"

jqwik = "net.jqwik:jqwik:1.9.0"

mockito-bom = "org.mockito:mockito-bom:5.11.0"
mockito-bom = "org.mockito:mockito-bom:5.22.0"
mockito-core.module = "org.mockito:mockito-core"
mockito-junit-jupiter.module = "org.mockito:mockito-junit-jupiter"

Expand All @@ -93,15 +94,15 @@ rhino = "org.mozilla:rhino-runtime:1.7.13"
jchronic = "com.sk89q:jchronic:0.2.4a"
jlibnoise = "com.sk89q.lib:jlibnoise:1.0.0"

fabric-minecraft = "com.mojang:minecraft:1.21.11"
fabric-minecraft = "com.mojang:minecraft:26.1-rc-1"
fabric-loader = "net.fabricmc:fabric-loader:0.18.4"
fabric-permissions-api = "me.lucko:fabric-permissions-api:0.6.1"

neoforge = "net.neoforged:neoforge:21.11.38-beta"
neoforge = "net.neoforged:neoforge:26.1.0.0-alpha.15+pre-3"

# Mojang-provided libraries, CHECK AGAINST MINECRAFT for versions
guava = "com.google.guava:guava:33.5.0-jre!!"
log4j-bom = "org.apache.logging.log4j:log4j-bom:2.24.1!!"
log4j-bom = "org.apache.logging.log4j:log4j-bom:2.25.2!!"
log4j-api.module = "org.apache.logging.log4j:log4j-api"
log4j-core.module = "org.apache.logging.log4j:log4j-core"
gson = "com.google.code.gson:gson:2.13.2!!"
Expand Down
7 changes: 6 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ pluginManagement {
}
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
id("fabric-loom") version "1.15.4"
}
dependencyResolutionManagement {
repositories {
Expand All @@ -41,6 +40,7 @@ dependencyResolutionManagement {
name = "EngineHub (Non-Mirrored)"
url = URI.create("https://repo.enginehub.org/libs-release/")
metadataSources {
gradleMetadata()
mavenPom()
artifact()
}
Expand All @@ -59,6 +59,11 @@ dependencyResolutionManagement {
includeModuleByRegex(".*", "worldedit-lang")
}
}
mavenCentral()
maven {
name = "Minecraft Libraries"
url = uri("https://libraries.minecraft.net/")
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,8 @@ public boolean isActive() {
updateActive();
} else {
// we should update it eventually
// Suppress FutureReturnValueIgnored: We handle it in the block.
@SuppressWarnings({"FutureReturnValueIgnored", "unused"})
var unused = Bukkit.getScheduler().callSyncMethod(plugin, () -> {
// We don't need the future as we handle exceptions in `updateActive`
var _ = Bukkit.getScheduler().callSyncMethod(plugin, () -> {
updateActive();
return null;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public boolean setLocation(Location location) {
org.bukkit.entity.Entity entity = entityRef.get();
if (entity != null) {
if (WorldEditPlugin.getInstance().isFolia()) {
var unused = PaperLib.teleportAsync(entity, BukkitAdapter.adapt(location));
var _ = PaperLib.teleportAsync(entity, BukkitAdapter.adapt(location));
return true;
} else {
return entity.teleport(BukkitAdapter.adapt(location));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public boolean trySetPosition(Vector3 pos, float pitch, float yaw) {
Location location = new Location(player.getWorld(), pos.x(), pos.y(),
pos.z(), yaw, pitch);
if (WorldEditPlugin.getInstance().isFolia()) {
var unused = PaperLib.teleportAsync(player, location);
var _ = PaperLib.teleportAsync(player, location);
return true;
} else {
return player.teleport(location);
Expand Down Expand Up @@ -232,7 +232,7 @@ public com.sk89q.worldedit.util.Location getLocation() {
@Override
public boolean setLocation(com.sk89q.worldedit.util.Location location) {
if (WorldEditPlugin.getInstance().isFolia()) {
var unused = PaperLib.teleportAsync(player, BukkitAdapter.adapt(location));
var _ = PaperLib.teleportAsync(player, BukkitAdapter.adapt(location));
return true;
} else {
return player.teleport(BukkitAdapter.adapt(location));
Expand Down
2 changes: 1 addition & 1 deletion worldedit-core/doctools/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
kotlin("jvm") version "2.2.21"
kotlin("jvm") version "2.3.10"
application
id("buildlogic.common")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,13 @@ public ListenableFuture<T> buildAndExec(ListeningExecutorService executor) {
return future;
}

// Suppress FutureReturnValueIgnored: We handle the future internally
@SuppressWarnings("FutureReturnValueIgnored")
/**
* Like {@link #buildAndExec(ListeningExecutorService)}, but ignores the return value of the task.
*
* @param executor the executor to run the task on
*/
public void buildAndExecNoReturnValue(ListeningExecutorService executor) {
buildAndExec(executor);
var _ = buildAndExec(executor);
}

@SuppressWarnings("deprecation")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ protected Context makeContext() {
RhinoContext cx = new RhinoContext(this);
try {
// Try to set ES6 compat flag (since 1.7.7)
@SuppressWarnings("unused")
var unused = Context.class.getDeclaredField("VERSION_ES6");
var _ = Context.class.getDeclaredField("VERSION_ES6");
cx.setLanguageVersion(RhinoContext.VERSION_ES6);
} catch (NoSuchFieldException e) {
// best we can do, compatible with 1.7R2 that many people probably use
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public synchronized void close() throws SecurityException {
}

@Override
public void setEncoding(@Nullable String encoding) throws SecurityException, UnsupportedEncodingException {
public synchronized void setEncoding(@Nullable String encoding) throws SecurityException, UnsupportedEncodingException {
StreamHandler handler = this.handler;
this.encoding = encoding;
if (handler != null) {
Expand All @@ -117,7 +117,7 @@ public synchronized void flush() {
}

@Override
public void setFormatter(@Nullable Formatter newFormatter) throws SecurityException {
public synchronized void setFormatter(@Nullable Formatter newFormatter) throws SecurityException {
StreamHandler handler = this.handler;
this.formatter = newFormatter;
if (handler != null) {
Expand Down Expand Up @@ -150,7 +150,7 @@ public String getEncoding() {
}

@Override
public void setFilter(@Nullable Filter newFilter) throws SecurityException {
public synchronized void setFilter(@Nullable Filter newFilter) throws SecurityException {
StreamHandler handler = this.handler;
this.filter = newFilter;
if (handler != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public LogFormat(String format) {
try {
// Validate format:
@SuppressWarnings("unused")
var unused = String.format(format, currentDateTime, "", "", "", "", "");
var _ = String.format(format, currentDateTime, "", "", "", "", "");
} catch (IllegalArgumentException var3) {
format = DEFAULT_FORMAT;
}
Expand Down
Loading