markdown-gradle-plugin
markdown-gradle-plugin copied to clipboard
Asynchronious execution ?
Hi, I am trying to postprocess generated html but it seems it is not written to buildDir
before the markdownToHtml
task ends.
The following task dependent on markdownToHtml
is trying to read content of generated html and insert it into another template html but fails on the missing file:
task compileReadme(type: Copy, dependsOn: markdownToHtml) {
from 'src/html'
into buildDir
// Thread.sleep(3000)
filter(ReplaceTokens, tokens: [BODY: file("$buildDir/gen-html/README.html") ])
}
If I add some sleep to wait until the generated file is actually written to buildDir
it works as expected.
Shouldn't the task wait until the output files are written to buildDir
before it finishes and tasks that are dependent on it starts ?