question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make spotless tasks all cacheable with the Gradle Build Cache

See original GitHub issue

This should be as simple as adding the @CachableTask annotation to all of the relevant tasks.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
nedtwiggcommented, May 4, 2020

An issue that we’re going to have (just popped up in #559) is that most of our FormatterStep cache keys are machine-dependent at the moment. The task reorganization that @bigdaz has proposed is a definite improvement, and will make the local buildcache useful to users. But in order for Spotless to be path-independent (necessary for shared buildcache to be useful), we need to make FileSignature path and machine independent. I think we should discuss and implement this separately, the issue lives at #566.

1reaction
nedtwiggcommented, Apr 2, 2020

I did a quick investigation, and it looks like we can probably support this usecase by bumping our minimum-required gradle to 3.0, and we can certainly support it if we bump to 3.5. We have to go all the way to 4.9 to get completely native config-avoidance APIs, which is the other sticking point we’ve had.

No need for a screenshot, a gradle engineer with a real customer usecase is proof-enough for me that there’s value in bumping the minimum. I’m definitely on-board with bumping to 3.0 (3.5 if necessary), and if this heavy-duty usecase can also show that we get measurable benefit from 4.9 then I’m okay with that too. Implementing this is not high on my apocalypse-todo-list, but releasing good PRs quickly is always high on my todo list, even in an apocalypse.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build Cache - Gradle User Manual
The Gradle build cache is a cache mechanism that aims to save time by reusing outputs produced by other builds. The build cache...
Read more >
Gradle Build Cache Basics - Baeldung
The Gradle build cache is semi-permanent storage that saves the build tasks' outputs. It enables the reuse of already generated artifacts ...
Read more >
Caching for faster builds | Gradle Enterprise Docs
At this point, the build is fully configured and ready to run. We will run this build with a clean , which will...
Read more >
Turbocharging your Android Gradle builds using the build cache
Put org.gradle.caching=true in your gradle.properties file. Gradle will attempt to reuse outputs from previous builds for all builds.
Read more >
Gradle Build Cache after gradle clean - Stack Overflow
The build cache does not store the task outputs in the project workspace, but in a local or remote build cache. The local...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found