Make root build produce loadable plugin jar by packaging plugin shadow JAR #1

Merged
NotAlexNoyle merged 1 commits from codex/fix-runtime-error-in-eternalcombat-plugin into master 2026-03-16 05:45:56 -04:00
NotAlexNoyle commented 2026-03-16 05:45:45 -04:00 (Migrated from github.com)

Motivation

  • Paper was attempting to load the root project JAR which contained no plugin.yml/paper-plugin.yml, causing does not contain a paper-plugin.yml or plugin.yml runtime error.

Description

  • Disabled the root jar task to avoid emitting an empty aggregator JAR.
  • Added a root pluginJar Copy task that depends on :eternalcombat-plugin:shadowJar, copies the plugin module's shadow artifact, and renames it to EternalCombat-<version>.jar into build/libs.
  • Wired tasks.assemble to depend on pluginJar so standard build flows produce a deployable, loadable plugin JAR at the expected path/name.

Testing

  • Ran ./gradlew :eternalcombat-plugin:shadowJar :eternalcombat-plugin:jar --no-daemon which failed before task execution due to the environment Java runtime being openjdk version "25.0.1" and Gradle/Kotlin script evaluation raising IllegalArgumentException: 25.0.1 (build tooling issue, not the packaging change).
  • Ran ./gradlew :eternalcombat-plugin:jar --stacktrace --no-daemon which hit the same Kotlin/Java version parse failure.
  • No automated build succeeded in this environment because of the JDK 25 parsing error, but the build.gradle.kts change statically ensures assemble will copy the plugin shadow JAR to the canonical root output path when run in a compatible Java/Gradle environment.

Codex Task

### Motivation - Paper was attempting to load the root project JAR which contained no `plugin.yml`/`paper-plugin.yml`, causing `does not contain a paper-plugin.yml or plugin.yml` runtime error. ### Description - Disabled the root `jar` task to avoid emitting an empty aggregator JAR. - Added a root `pluginJar` `Copy` task that depends on `:eternalcombat-plugin:shadowJar`, copies the plugin module's shadow artifact, and renames it to `EternalCombat-<version>.jar` into `build/libs`. - Wired `tasks.assemble` to depend on `pluginJar` so standard build flows produce a deployable, loadable plugin JAR at the expected path/name. ### Testing - Ran `./gradlew :eternalcombat-plugin:shadowJar :eternalcombat-plugin:jar --no-daemon` which failed before task execution due to the environment Java runtime being `openjdk version "25.0.1"` and Gradle/Kotlin script evaluation raising `IllegalArgumentException: 25.0.1` (build tooling issue, not the packaging change). - Ran `./gradlew :eternalcombat-plugin:jar --stacktrace --no-daemon` which hit the same Kotlin/Java version parse failure. - No automated build succeeded in this environment because of the JDK 25 parsing error, but the `build.gradle.kts` change statically ensures `assemble` will copy the plugin shadow JAR to the canonical root output path when run in a compatible Java/Gradle environment. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_69b7cf2a5100832f8b6bc7fdacb8bf1a)
Sign in to join this conversation.