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

Short-circuit dependency chain if task outputs exist

$
0
0

I don’t see what you try to achieve by adding calls to upToDateWhen.

What I “try to achieve” is to consider the generate output as up-to-date if it exists at all. Surely I stated that clearly in my original post. Your deeper understanding of Gradle may make it obvious to you that my attempts to achieve this were misguided, but you can’t honestly say that you don’t know what I am trying to achieve.

You cannot prevent Gradle from checking the contents of the inputs and outputs, so adding the call to upToDateWhen doesn’t help.

This is an interesting limitation of upToDateWhen that I did not find in the documentation. That limitation may be obvious to you given your clearly superior knowledge of Gradle, but was certainly not obvious to me. Perhaps the upToDateWhen documentation should point this out for the benefit of ignorant folks like me.

So what you want to do is have up-to-date checks for the download task? The task will fail if it can’t download the file and it will be up-to-date if the file is already downloaded.

We want to retain (in version control) the output files produced by the generate task. You seem to be proposing that we instead retain the file retrieved by the download task. Unfortunately, that is not an option for intellectual-property reasons. We’re not allowed to retain the file that download retrieves, even though we are allowed to retain the file that generate produces from it.


Viewing all articles
Browse latest Browse all 20501

Latest Images

Trending Articles



Latest Images