Vladimir Sitnikov
07/20/2025, 6:23 AM:core
and :lib
, and :test-fixtures
. Imagine I want publishing a platform that would align the versions of :core
and :lib
. I do not publish :test-fixtures
and I use it for testing only, so I do not want including it to the bom.
Of course, I can list :bom
dependencies manually, however, it would be prone to errors as I might forget adding a module to the bom when adding a new module.
I use convention plugins to configure the publication for :core
and :lib
modules, so I would like to configure :bom
automatically for all the published projects. Can I somehow do that?
I see JUnit uses rootProject.extra
for storing the list of projects in a bom, however, it looks like it duplicates the configuration:
• firstly, it list the projects in root project extra
• secondly, the relevant subprojects have their publication configurations
The configurations could deviate. For example, a new module could be added without updating root project extra.
Is rootProject.extra
the best we can have for now? Is it safe for configuration-cache/isolated-projects?Vampire
07/20/2025, 6:58 AMext
/ extra
properties are usually always a work-around for not doing something properly. I learned from Gradle folks that you should feel dirty everytime you use them.
I guess what you could do is to have a list of projects in the settings script, then iterate this list and call include
for it and also set the list to a shared build service. Then in the platform project you can iterate the list in the build service to build up the dependencies.Vladimir Sitnikov
07/20/2025, 7:10 AMVampire
07/20/2025, 8:23 AMVampire
07/20/2025, 8:27 AMVampire
07/20/2025, 8:27 AM