From 648871e784a22510169d584e14d0ab56b8f05080 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 26 Sep 2026 22:21:46 -0700 Subject: [PATCH] Configure Java 25 toolchain --- TODO.md | 2 +- build.gradle | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index cda8e4e..01b3d35 100644 --- a/TODO.md +++ b/TODO.md @@ -3,7 +3,7 @@ | ID | Status | Title | |:-------:|:--------:|:------| | MET-001 | Done | Initialize Gradle in the project root, add the Gradle wrapper, and create the project build file. | -| MET-002 | Ready | Set Gradle project metadata and configure a Java toolchain compatible with the target modern Paper version. | +| MET-002 | Done | Set Gradle project metadata and configure a Java toolchain compatible with the target modern Paper version. | | MET-003 | Ready | Configure repositories and compatible PaperMC, WorldEdit, WorldGuard, and other required or optional dependencies; add build plugins such as Shadow only if needed. | | MET-004 | Ready | Move or verify plugin.yml under src/main/resources, configure Gradle resource processing, and update its Paper api-version, dependencies, commands, permissions, and required fields. | | MET-005 | Ready | Add JUnit 5 test infrastructure and keep the default Gradle `test` task server-free. Use an in-memory Paper harness such as MockBukkit for Bukkit/Paper behavior and mocks or test doubles for WorldEdit, WorldGuard, and narrow API boundaries where appropriate. | diff --git a/build.gradle b/build.gradle index 16a86fa..9beead7 100644 --- a/build.gradle +++ b/build.gradle @@ -6,6 +6,20 @@ plugins { group = 'com.majinnaibu.bukkitplugins' description = 'Metropolis' +java { + toolchain { + languageVersion = JavaLanguageVersion.of(25) + } +} + +tasks.named('updateDaemonJvm') { + languageVersion = JavaLanguageVersion.of(25) +} + +tasks.withType(JavaCompile).configureEach { + options.encoding = 'UTF-8' +} + tasks.named('wrapper') { gradleVersion = '9.8.0' distributionType = Wrapper.DistributionType.BIN