Skip to content

Conversation

snowykte0426
Copy link

Description

This pull request addresses issue #23972 by moving the configuration of property sections from the buildSrc module to the spring-boot-docs module's build.gradle script.

Problem

The configuration property sections for the appendix were hardcoded in the DocumentConfigurationProperties task within the buildSrc 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 the buildSrc directory.

Solution

This PR refactors the approach by:

  1. Modifying DocumentConfigurationProperties class: Added support for declarative configuration through a new ListProperty<PropertySectionDefinition> field that allows external configuration of property sections.

  2. Creating PropertySectionDefinition class: A new data class that encapsulates section information including filename, title, prefixes, and descriptions.

  3. Moving configuration to spring-boot-docs/build.gradle: The property sections are now declaratively configured in the documentConfigurationProperties task within the docs module's build script.

Benefits

  • Improved build performance: Changes to property sections no longer trigger full project rebuilds
  • Better maintainability: Configuration is now declarative and easier to modify
  • Clearer separation of concerns: Build logic stays in buildSrc while configuration moves to the appropriate module

Changes Made

  • Modified buildSrc/src/main/java/org/springframework/boot/build/context/properties/DocumentConfigurationProperties.java to support external configuration
  • Updated documentation/spring-boot-docs/build.gradle to include declarative property section definitions

The implementation maintains backward compatibility by providing default sections when no external configuration is specified.

The configuration of the configuration property sections in the appendix
was hardcoded in the DocumentConfigurationProperties task in buildSrc.
When a change is made to the sections, this triggers an entire rebuild
due to how Gradle treats buildSrc.
This commit moves the configuration to the spring-boot-docs modules
build.gradle script where it can be declarative, avoiding unnecessary
full rebuilds when sections are modified.
Closes spring-projectsgh-23972

Signed-off-by: Kim Tae Eun <[email protected]>
@wilkinsona
Copy link
Member

Thanks for the PR. Please sign your commits as described in the DCO check failure.

@snowykte0426
Copy link
Author

Thanks for the PR. Please sign your commits as described in the DCO check failure.

Hi @wilkinsona,
Thank you for the feedback. I apologize for the missing DCO sign-off on the commits.
The DCO issue occurred while I was resolving merge conflicts - I accidentally made commits without proper sign-off during the conflict resolution process.
Should I resolve this immediately?

Please let me know if you'd like me to handle this right away or if there's a preferred timing for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants