jamesfredley commented on PR #15827:
URL: https://github.com/apache/grails-core/pull/15827#issuecomment-4997826317
The Gradle-technical points are valid - I'll address them:
- **`.matching { }.configureEach { }`** - agreed this is the main issue. It
silently no-ops if the publication tasks are never created (e.g. the publish
plugin renames its publication), so on a real release the snapshot validation
could silently not run. Since that guard only matters when `isReleaseBuild &&
isPublishedExternal`, I'll assert the tasks exist in that case rather than
matching by name.
- **`check` -> `extractConstraints` lifecycle** - I'll remove it and keep
constraint extraction explicit (`grails-doc:generateBomDocumentation` already
invokes it). As you noted it also breaks the previously
configuration-cache-compatible BOM check
(`ConfigurationContainer`/`DependencyHandler`/`Project` serialization).
- **`projectVersion` handling** - fail fast
(`project.property('projectVersion')` / explicit check) instead of letting
`findProperty` return null and silently producing `:unspecified` coordinates.
- **Rename to `GrailsBomPlugin`**, and **keep `publish` & `sbom` on the
individual projects** rather than an aggregate plugin (matching existing
convention).
- **`else if (!inlineVersion)`** - simplify to a plain `else`.
- Noted your point that the buildscript-vs-plugin application difference
(line 73) is OK but worth calling out.
On **`dependencies.gradle`** - fair. The standard for that file is a flat,
readable list of dependencies, and the extractions make it harder to maintain.
I'll revert the `dependencies.gradle` extraction and keep the flat listing.
Net: this becomes a smaller, lazier convention-plugin extraction (the parts
that genuinely dedupe the BOM build logic) without the `dependencies.gradle`
churn, the aggregate-plugin behavior, or the non-lazy `.matching`/`check`-hook
changes. I'll push the rework.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]