This message was deleted.
# caching
s
This message was deleted.
v
That's not a task, that's an artifact transform. That's why your snippet can of course not work. And I'm actually not aware of any runtime API to disable the caching of an artifact transform.
Besides disabling caching completely of course
d
disabling caching completely means we override source code from buildSrc and remove cache annotation there?
v
Actually I meant disableing caching for the whole build for everything, i. e. not enabling caching. But yeah, as
buildSrc
classes are prepended to the classpath you can monkey-patch plugin classes like that, I did this before too. So yes, copying the class to
buildSrc
with the annotation omitted is the only way I am aware of how you could do it.
If there are valid use-cases, you might also open a feature request on GitHub for having a runtime API to control the cacheability of artifact transforms.
d
ah i see, thanks for your info. is this possible to disable cache from gradle.properties then enable on some task by modify tasks.withType(it).configureEach { outputs.cacheIf { true} } ? it is not possible lol