Include processed resources in shadowJar to enable plugin.yml expansion #4

Merged
NotAlexNoyle merged 1 commits from codex/fix-apiversion-expansion-in-plugin.yml into master 2026-01-03 08:04:14 -05:00
NotAlexNoyle commented 2026-01-03 08:04:05 -05:00 (Migrated from github.com)

Motivation

  • plugin.yml uses placeholders like api-version: '${apiVersion}' which are expanded by the processResources task.
  • shadowJar was sourcing sourceSets.main.get().resources, which can bypass the processed/expanded outputs.
  • As a result the expanded apiVersion value from build.gradle.kts was not ending up in the final shadow jar.
  • The change ensures the jar contains the processed resources with expanded properties.

Description

  • Modified build.gradle.kts to update tasks.shadowJar to use from(tasks.processResources) instead of from(sourceSets.main.get().resources).
  • This causes the outputs of processResources (including filesMatching("plugin.yml") { expand(props) }) to be bundled into the shadow jar.
  • Only the resource source for shadowJar was changed; no other logic was modified.

Testing

  • No automated tests were executed as part of this rollout.

Codex Task

### Motivation - `plugin.yml` uses placeholders like `api-version: '${apiVersion}'` which are expanded by the `processResources` task. - `shadowJar` was sourcing `sourceSets.main.get().resources`, which can bypass the processed/expanded outputs. - As a result the expanded `apiVersion` value from `build.gradle.kts` was not ending up in the final shadow jar. - The change ensures the jar contains the processed resources with expanded properties. ### Description - Modified `build.gradle.kts` to update `tasks.shadowJar` to use `from(tasks.processResources)` instead of `from(sourceSets.main.get().resources)`. - This causes the outputs of `processResources` (including `filesMatching("plugin.yml") { expand(props) }`) to be bundled into the shadow jar. - Only the resource source for `shadowJar` was changed; no other logic was modified. ### Testing - No automated tests were executed as part of this rollout. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_6959132d3738832f87e1d26deab1c70f)
Sign in to join this conversation.