Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 19859

When are gradle task inputs evaluated?

$
0
0

When does Gradle evaluate inputs of tasks? - I couldn’t find it anywhere.

In my particular case, I would like to have a guarantee that the inputs of my task are evaluated after all of it’s task dependencies have finished. Is that guaranteed? Basically my task depends on output of another (which generates files on the filesystem) in a non-trivial way. If that’s not the case caching can be broken.

From experimentation it seems like the evaluation happens at least twice, once during project’s configuration and once right before the task actually executes. In this case, I would have to do something ugly like check if the task I depend on already executed - if yes, I can compute my real input, if not return an empty value.


Viewing all articles
Browse latest Browse all 19859

Trending Articles