Skip to content

Asynchronious execution ? #26

@verglor

Description

@verglor

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions