This message was deleted.
# community-support
s
This message was deleted.
v
That the task is out-of-date is fine, otherwise it would just be up-to-date. That does not yet mean that it is not served from cache.
a
sorry, I'm not sure what you mean? I'd expect to see FROM-CACHE, because none of the inputs have changed and because the task is marked as
@CacheableTask
the outputs are loaded from the build cache. Instead, the task runs. The only messaging I get is about one above, saying "the task was not up-to-date" - which isn't correct because nothing changed.
v
It is correct, that it is not up-to-date, because the outputs did change. If the task actually runs and is not
FROM-CACHE
, that's a different story then of course. You might get some more helpful info with
-Dorg.gradle.caching.debug=true
iirc.
a
I found out what it was! I looked in the debug log output and found that the task wasn't treated as cacheable (and for whatever reason Gradle Scan doesn't show that). I had added a workaround for one of the artifact view bugs, where a consuming project lost a task dependency, so the consumer would manually create the output directory of the provider task. And that meant that Gradle silently refused to cache the task output because it couldn't figure out which task made that directory.
👌 1