Extract shared BOM build conventions#15827
Open
jamesfredley wants to merge 3 commits into
Open
Conversation
Centralize duplicated BOM publication, constraint extraction, and POM customization logic in a build-logic convention plugin. Apply it across the BOM modules while keeping generated POM and constraints output byte-identical to the current 8.0.x baseline. Assisted-by: Hephaestus:openai/gpt-5.5 codex-review
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request extracts repeated Grails BOM build logic into a shared build-logic Gradle plugin, then applies it across the various BOM subprojects to reduce duplication and centralize publication / POM / constraints behavior.
Changes:
- Add
org.apache.grails.buildsrc.bom-conventionsplugin to encapsulate common BOM conventions (publication hooks, constraints extraction wiring, snapshot validation, POM customization). - Update Grails BOM subprojects (default/base/hibernate*/micronaut*) to use the shared plugin and remove duplicated build script logic.
- Refactor
dependencies.gradleto generate Groovy module dependency maps via a shared helper and remove now-unreachable override branches.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| grails-bom/micronaut/build.gradle | Switch Micronaut BOM to shared bom-conventions plugin; remove duplicated publication/constraints logic. |
| grails-bom/hibernate7/build.gradle | Switch Hibernate 7 BOM to shared bom-conventions plugin; remove duplicated publication/constraints logic. |
| grails-bom/hibernate7-micronaut/build.gradle | Switch Hibernate 7 + Micronaut BOM to shared bom-conventions plugin; remove duplicated publication/constraints logic. |
| grails-bom/hibernate5/build.gradle | Switch Hibernate 5 BOM to shared bom-conventions plugin; remove duplicated publication/constraints logic. |
| grails-bom/hibernate5-micronaut/build.gradle | Switch Hibernate 5 + Micronaut BOM to shared bom-conventions plugin; remove duplicated publication/constraints logic. |
| grails-bom/default/build.gradle | Switch default BOM to shared bom-conventions plugin; remove duplicated publication/constraints logic. |
| grails-bom/base/build.gradle | Switch base BOM to shared bom-conventions plugin; remove duplicated publication/constraints logic. |
| dependencies.gradle | Extract Groovy module dependency map generation into a helper and simplify override branching. |
| build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/BomConventionsPlugin.groovy | New shared BOM conventions plugin implementing extracted common logic. |
| build-logic/plugins/build.gradle | Register the new plugin and add required module dependency for BOM task classes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 8.0.x #15827 +/- ##
==================================================
+ Coverage 49.3625% 49.3636% +0.0011%
- Complexity 16777 16778 +1
==================================================
Files 1986 1986
Lines 93336 93336
Branches 16337 16337
==================================================
+ Hits 46073 46074 +1
- Misses 40134 40136 +2
+ Partials 7129 7126 -3 🚀 New features to boost your workflow:
|
Use the configured Gradle-build project group mappings when registering POM property replacements, and add focused TestKit coverage for the shared BOM conventions plugin. Assisted-by: Hephaestus:openai/gpt-5.5 codex-review
✅ All tests passed ✅🏷️ Commit: 23714e7 Learn more about TestLens at testlens.app. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR reduces duplicated Gradle BOM build logic by moving the shared publication, POM customization, constraint extraction, and release snapshot validation conventions into
org.apache.grails.buildsrc.bom-conventions.The BOM build scripts now keep only BOM-specific inputs such as descriptions, dependency declarations, and variant-specific dependency sets. The shared plugin owns the common task wiring and POM mutation behavior used by the seven Grails BOM projects.
Changes
BomConventionsPlugininbuild-logic/pluginsand register it asorg.apache.grails.buildsrc.bom-conventions.dependencies.gradlewhile leaving one literal coordinate list for Dependabot visibility.gradleBuildProjectsgroup mapping when registering Gradle-build artifacts for POM property replacement.Verification
JAVA_HOME=/tmp/opencode/jdk21 ./gradlew :build-logic-root:build-logic:compileGroovy :build-logic-root:build-logic:testJAVA_HOME=/tmp/opencode/jdk21 ./gradlew :build-logic-root:build-logic:test --tests org.apache.grails.buildsrc.BomConventionsPluginSpec-PincludeMicronautProjects.extractConstraintsfor all seven BOMs with-PincludeMicronautProjects.origin/8.0.xbaseline: no differences.8.0.0-SNAPSHOTversions.Notes
.groovy/.gradlebecause no Groovy/Gradle LSP is configured.origin/8.0.x(GraphQL static compile errors and MongoDB timeout flakes), reproduced in a clean baseline worktree.