Migrate BuildBattle from Maven to Gradle (Purpur 1.19.4, GraalVM 17) #1

Merged
NotAlexNoyle merged 1 commits from codex/convert-minecraft-plugin-from-maven-to-gradle into master 2026-03-18 05:28:39 -04:00
NotAlexNoyle commented 2026-03-18 05:26:39 -04:00 (Migrated from github.com)

Motivation

  • Replace the existing Maven build with a modern Gradle Kotlin DSL setup targeting Purpur 1.19.4 and a GraalVM-based Java 17 toolchain to match current development requirements.
  • Preserve the existing shading/relocation behavior used for MiniGamesBox and bundle plugin resources/licenses reproducibly.
  • Add common Gradle project tooling (Spotless, Shadow, Checkstyle, Eclipse support, wrapper) so the project can be built and formatted with Gradle workflows.

Description

  • Add build.gradle.kts implementing the provided template with group = "plugily.projects", version = "5.1.3", Purpur API 1.19.4-R0.1-SNAPSHOT, Java toolchain set to 17 with JvmVendorSpec.GRAAL_VM, Spotless, Shadow, and Checkstyle configured.
  • Add Gradle support files: settings.gradle.kts, POSIX and Windows wrapper launchers (gradlew, gradlew.bat), eclipse.gradle.kts, and minimal config/checkstyle/checkstyle.xml and config/formatter/eclipse-java-formatter.xml files.
  • Update src/main/resources/plugin.yml to use Gradle resource expansion for version and apiVersion (${version} / ${apiVersion}) and add Gradle outputs to .gitignore (/.gradle/, /build/).
  • Remove the Maven pom.xml and wire the repository list/relocations and resource processing into the new Gradle build while preserving existing relocations from the Maven shade configuration.

Testing

  • Ran git diff --check to validate whitespace/merge conflicts and the check passed.
  • Performed a shell syntax check with bash -n gradlew which passed for the generated POSIX wrapper script.
  • Attempted gradle help and gradle wrapper in this environment, but Gradle failed to resolve external plugins (e.g., Spotless) due to network / plugin-repository restrictions in the execution environment, so full Gradle task execution could not be verified here.

Codex Task

### Motivation - Replace the existing Maven build with a modern Gradle Kotlin DSL setup targeting Purpur `1.19.4` and a GraalVM-based Java 17 toolchain to match current development requirements. - Preserve the existing shading/relocation behavior used for MiniGamesBox and bundle plugin resources/licenses reproducibly. - Add common Gradle project tooling (Spotless, Shadow, Checkstyle, Eclipse support, wrapper) so the project can be built and formatted with Gradle workflows. ### Description - Add `build.gradle.kts` implementing the provided template with `group = "plugily.projects"`, `version = "5.1.3"`, Purpur API `1.19.4-R0.1-SNAPSHOT`, Java toolchain set to 17 with `JvmVendorSpec.GRAAL_VM`, Spotless, Shadow, and Checkstyle configured. - Add Gradle support files: `settings.gradle.kts`, POSIX and Windows wrapper launchers (`gradlew`, `gradlew.bat`), `eclipse.gradle.kts`, and minimal `config/checkstyle/checkstyle.xml` and `config/formatter/eclipse-java-formatter.xml` files. - Update `src/main/resources/plugin.yml` to use Gradle resource expansion for `version` and `apiVersion` (`${version}` / `${apiVersion}`) and add Gradle outputs to `.gitignore` (`/.gradle/`, `/build/`). - Remove the Maven `pom.xml` and wire the repository list/relocations and resource processing into the new Gradle build while preserving existing relocations from the Maven shade configuration. ### Testing - Ran `git diff --check` to validate whitespace/merge conflicts and the check passed. - Performed a shell syntax check with `bash -n gradlew` which passed for the generated POSIX wrapper script. - Attempted `gradle help` and `gradle wrapper` in this environment, but Gradle failed to resolve external plugins (e.g., Spotless) due to network / plugin-repository restrictions in the execution environment, so full Gradle task execution could not be verified here. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_69ba6d148898832f9bd24c5fdf45d0a1)
Sign in to join this conversation.