I have a Gradle build with both local and remote cache configured. Among other things I use Spotless Gradle plugin. That plugin has marked its tasks (spotlessCheck and spotlessApply) as cacheable. The problem is that in my case task itself is quite fast and thus checking task's output in remote cache takes more time than actually running the task.
So my question: is it possible to disable cache for one task introduced by the 3rd plugin? Even better, is it possible to disable just remote cache for just one task?
I don't think those two particular tasks you mention have the build cache enabled. But other ones like
spotlessJavado.In any case, when you have figured out which tasks use the build cache (e.g. by running with
-i), you can configure them withoutputs.cacheIf { false }.Note that this disables both the local and remote build cache. I am not aware of a way to selectively disable just the remote cache for a given task but keep the local one enabled.
For instance: