Implement a cacheable, incremental Gradle task that applies a configured MarkdownPipeline to a directory of .md files.
Scope
@CacheableTask abstract class ProcessMarkdownTask : DefaultTask()
@InputDirectory @PathSensitive(RELATIVE) abstract val sourceDir: DirectoryProperty
@OutputDirectory abstract val outputDir: DirectoryProperty
- Pipeline configuration (transformers + options) declared via task properties
- Incremental processing via Gradle's
@Incremental input API — only reprocess changed files
- Each
.md file in sourceDir is processed through the pipeline and written to the corresponding path under outputDir
- Non-
.md files are copied as-is
Acceptance criteria
- Task processes all
.md files in the source directory
- UP-TO-DATE check works correctly — unchanged files are not reprocessed
TemplateSubstitutor and HtmlCommentExpander are configurable on the task
Implement a cacheable, incremental Gradle task that applies a configured
MarkdownPipelineto a directory of.mdfiles.Scope
@CacheableTask abstract class ProcessMarkdownTask : DefaultTask()@InputDirectory @PathSensitive(RELATIVE) abstract val sourceDir: DirectoryProperty@OutputDirectory abstract val outputDir: DirectoryProperty@Incrementalinput API — only reprocess changed files.mdfile insourceDiris processed through the pipeline and written to the corresponding path underoutputDir.mdfiles are copied as-isAcceptance criteria
.mdfiles in the source directoryTemplateSubstitutorandHtmlCommentExpanderare configurable on the task