How can I add a subprojects description as POM description?

My previously working code to use ‘project.description’ as content for the ‘description’ element of the generated subproject POMs doesn’t work any more. I believe it broke when I moved the subprojects configuration out of the root build.gradle file, into their own build.gradle file. Currently the generated POMs all have ‘null’ as description. Simply adding

description project.description

in the pom.project section results also in ‘null’ as POM description.

How can I get it working again?

You need to make sure to only read the subprojects’ ‘project.description’ values after they have been set (i.e. after the subprojects have been configured). One way to do so is to add ‘configurationDependsOnChildren()’ just before the root project’s build script attempts to reads these values.

Thanks Peter, that did the trick. Although I’m pretty sure you meant ‘evaluationDependsOnChildren()’ :slight_smile: