Refactor bukkit Gradle packaging to build self-contained Panilla-${version}.jar (Kotlin DSL) #1

Merged
NotAlexNoyle merged 1 commits from codex/refactor-gradle-setup-for-panilla-plugin into master 2026-03-18 07:01:34 -04:00
NotAlexNoyle commented 2026-03-18 06:57:01 -04:00 (Migrated from github.com)

Motivation

  • Produce a single deployable plugin jar at build/libs/Panilla-${version}.jar that includes the panilla-api and other internal modules so Purpur 1.19.4 loads without NoClassDefFoundError: com.ruinscraft.panilla.api.IPanilla and the plugin continues to support 1.8+ clients, while keeping the build in Kotlin Gradle DSL.

Description

  • Replace the previous shadow/copy-script flow with a Kotlin-DSL pluginJar Jar task in bukkit/build.gradle.kts that aggregates :panilla-api and all craftbukkit subproject outputs into a single artifact written to the root build/libs directory and named Panilla-${version}.jar.
  • Disable the thin jar for the Bukkit module and wire assemble/build to depend on the new pluginJar task so the final artifact is the packaged plugin containing internal classes that previously were omitted.
  • Remove the external shadow plugin + copyjar.sh flow and instead declare a shadedProjects list and mainSourceSetOutput() helper to collect subproject outputs directly in Kotlin DSL.
  • Update root clean to delete the root build/ directory (so build/libs/Panilla-${version}.jar is cleaned) and remove the obsolete copyjar.sh script.

Testing

  • Ran ./gradlew help --offline which completed successfully and confirmed Gradle is healthy in this environment.
  • Ran ./gradlew :panilla-bukkit:tasks --all --offline which completed successfully and shows the new pluginJar task is available and wired into assemble/build.
  • Attempted full assembly with ./gradlew clean :panilla-bukkit:pluginJar but the compilation step could not complete in this environment because external Maven repositories returned HTTP 403 for required dependencies (e.g. Netty and Gson), so final artifact creation could not be verified here.

Codex Task

### Motivation - Produce a single deployable plugin jar at `build/libs/Panilla-${version}.jar` that includes the `panilla-api` and other internal modules so Purpur 1.19.4 loads without `NoClassDefFoundError: com.ruinscraft.panilla.api.IPanilla` and the plugin continues to support 1.8+ clients, while keeping the build in Kotlin Gradle DSL. ### Description - Replace the previous shadow/copy-script flow with a Kotlin-DSL `pluginJar` `Jar` task in `bukkit/build.gradle.kts` that aggregates `:panilla-api` and all craftbukkit subproject outputs into a single artifact written to the root `build/libs` directory and named `Panilla-${version}.jar`. - Disable the thin `jar` for the Bukkit module and wire `assemble`/`build` to depend on the new `pluginJar` task so the final artifact is the packaged plugin containing internal classes that previously were omitted. - Remove the external shadow plugin + `copyjar.sh` flow and instead declare a `shadedProjects` list and `mainSourceSetOutput()` helper to collect subproject outputs directly in Kotlin DSL. - Update root `clean` to delete the root `build/` directory (so `build/libs/Panilla-${version}.jar` is cleaned) and remove the obsolete `copyjar.sh` script. ### Testing - Ran `./gradlew help --offline` which completed successfully and confirmed Gradle is healthy in this environment. - Ran `./gradlew :panilla-bukkit:tasks --all --offline` which completed successfully and shows the new `pluginJar` task is available and wired into `assemble`/`build`. - Attempted full assembly with `./gradlew clean :panilla-bukkit:pluginJar` but the compilation step could not complete in this environment because external Maven repositories returned HTTP 403 for required dependencies (e.g. Netty and Gson), so final artifact creation could not be verified here. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_69ba80991b90832f82d556959345da98)
Sign in to join this conversation.