Move configuration property sections from buildSrc to spring-boot-docs #47121
+247
−165
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.
Description
This pull request addresses issue #23972 by moving the configuration of property sections from the
buildSrc
module to thespring-boot-docs
module'sbuild.gradle
script.Problem
The configuration property sections for the appendix were hardcoded in the
DocumentConfigurationProperties
task within thebuildSrc
module. This approach had a significant drawback: whenever changes were made to these sections, it would trigger a complete rebuild of the entire project due to how Gradle treats changes in thebuildSrc
directory.Solution
This PR refactors the approach by:
Modifying
DocumentConfigurationProperties
class: Added support for declarative configuration through a newListProperty<PropertySectionDefinition>
field that allows external configuration of property sections.Creating
PropertySectionDefinition
class: A new data class that encapsulates section information including filename, title, prefixes, and descriptions.Moving configuration to
spring-boot-docs/build.gradle
: The property sections are now declaratively configured in thedocumentConfigurationProperties
task within the docs module's build script.Benefits
buildSrc
while configuration moves to the appropriate moduleChanges Made
buildSrc/src/main/java/org/springframework/boot/build/context/properties/DocumentConfigurationProperties.java
to support external configurationdocumentation/spring-boot-docs/build.gradle
to include declarative property section definitionsThe implementation maintains backward compatibility by providing default sections when no external configuration is specified.