The GitHub Actions job "CI" on grails-core.git/pr-16082 has succeeded.
Run started by GitHub user jdaugherty (triggered by jdaugherty).

Head commit for run:
82ebbd775ea1e7a3a6e04a1fc130af9011203ed0 / James Daugherty 
<[email protected]>
fix: keep plugin templates out of the processResources filters

Routing src/main/templates through processResources subjected it to the
`**/*.gsp` exclusion that keeps compiled views out of build/resources/main,
because copy patterns set on a task apply to every spec composed into it.
Plugin templates are frequently GSPs, so this silently emptied them: the
grails-scaffolding jar lost all four META-INF/templates/scaffolding/*.gsp that
generate-views renders from, and grails-spring-security-ui lost all 45
META-INF/templates/views/**/*.gsp behind s2ui-override. Both shipped bare
directory entries instead.

copyCommands and copyTemplates now each own one directory that nothing else
writes, laid out as the archive sees it, attached to a source set output rather
than copied again by process*Resources. They stay Copy tasks, so build scripts
keep using tasks.named('copyTemplates', Copy), and they are registered when the
plugin is applied instead of in afterEvaluate - only the companion routing has
to defer, since grails-plugin-cli is applied after this plugin.

A plain Copy only ever adds, and a private staging directory gets no stale-state
cleanup from Gradle - not even when registered through SourceSetOutput.dir. Each
task therefore clears its own destination in a task action, so a deleted script
or template stops being packaged. Being an action rather than a separate clean
task, it runs only when the task executes and leaves up-to-date checks intact.
Sync would give the same result but would change a task type build scripts
depend on.

src/main/templates was also being contributed twice, once by enableNative2Ascii
and once by copyTemplates, an overlap that DuplicatesStrategy.INCLUDE was
hiding. That wiring moves out of enableNative2Ascii, which it never belonged to,
into an overridable configureTemplateResources that Grails plugins turn off
because copyTemplates already packages them.

PluginScriptCommandPackagingSpec covers companion and non-companion packaging,
GSP templates surviving alongside excluded plugin views, neither copy task
writing into a process*Resources output, and deletions taking effect without a
clean.

Report URL: https://github.com/apache/grails-core/actions/runs/30759571098

With regards,
GitHub Actions via GitBox

Reply via email to