micronaut-projects / micronaut-build

Common Gradle build scripts
Apache License 2.0
18 stars 14 forks source link

Improve BOM/catalog generation #691

Closed melix closed 5 months ago

melix commented 5 months ago

This commit enhances the possibilities when generating BOMs. Before this change, only Micronaut modules, which were published with a Gradle version catalog, were inlined into the generated BOM. With this change, a new option, inlineRegularBOMs, when set to true, will also inline BOMs which are not version catalogs.

There are limitations though. For example, we cannot reuse versions which were defined in the BOMs, if any. Instead, all included dependencies will have an alias matching the artifact id, and a version property will be defined with the same name. For example, if an artifact id is my-awesome-lib, then an alias with the name my-awsome-lib will be created in the catalog, a version with the same name will be created in the catalog, and in the Maven BOM a property named my.awesome.lib.version will be added so that users can override these easily.

In addition, it's now possible to include/exclude from inlining, on a per included catalog/BOM basis.