markdown-gradle-plugin icon indicating copy to clipboard operation
markdown-gradle-plugin copied to clipboard

Asynchronious execution ?

Open verglor opened this issue 6 years ago • 0 comments

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 ?

verglor avatar Nov 02 '18 22:11 verglor