A gradle plugin that converts spring-configuration-metadata.json
files (see Spring Configuration Metadata) into markdown tables
and writes them into your README.md (or other specified markdown files)
The plugin provides only one task renderMetadataTable
.
By executing the task the plugin will search for all spring-configuration-metadata.json
files except the build
folder.
All spring-configuration-metadata.json
files found are parsed and converted into a markdown table that is then written to the
README.md (default) located in the projects folder. The README.md file must at least contain the following marker tags to indicate
where the table should be rendered. (Hint: Each tag must be on its own line)
Example README.md
# Headline
<!-- springconfmetadata -->
<!-- /springconfmetadata -->
Example build.gradle.kts
...
springConfMetadataMarkdown {
// sets the target markdown file (defaults to: README.md)
readMeTarget.set(project.file("documentation.md"))
// configure the rendered columns (defaults to: Name, Type, Description, Default )
columns.set(
listOf(
dev.sbszcz.spring.conf.metadata.markdown.Column.Name,
dev.sbszcz.spring.conf.metadata.markdown.Column.Description,
dev.sbszcz.spring.conf.metadata.markdown.Column.Type
)
)
// control folders where 'spring-configuration-metadata.json' should be ignored from (defaults to: ['**/build/**'])
// include all folders by setting ignore to: ignore.set(listOf(""))
ignore.set(listOf("a_folder/", "b_folder/"))
}
...