Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asynchronious execution ? #26

Open
verglor opened this issue Nov 2, 2018 · 0 comments
Open

Asynchronious execution ? #26

verglor opened this issue Nov 2, 2018 · 0 comments

Comments

@verglor
Copy link

verglor commented Nov 2, 2018

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant