Package com.diffplug.spotless
Class ConfigurationCacheHackList
java.lang.Object
com.diffplug.spotless.ConfigurationCacheHackList
- All Implemented Interfaces:
Serializable
Gradle requires three things:
- Gradle defines cache equality based on your serialized representation
- Combined with remote build cache, you cannot have any absolute paths in
your serialized representation
- Combined with configuration cache, you must be able to roundtrip yourself
through serialization
These requirements are at odds with each other, as described in these issues
- Gradle issue to define custom equality
https://github.com/gradle/gradle/issues/29816
- Spotless plea for developer cache instead of configuration cache
https://github.com/diffplug/spotless/issues/987
- Spotless cache miss bug fixed by this class
https://github.com/diffplug/spotless/issues/2168
This class is a `List` which can optimize the
serialized representation for either
- roundtrip integrity
- OR
- equality
Because it is not possible to provide both at the same time.
It is a horrific hack, but it works, and it's the only way I can figure
to make Spotless work with all of Gradle's cache systems at once.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAll
(Collection<? extends FormatterStep> c) void
clear()
boolean
static ConfigurationCacheHackList
static ConfigurationCacheHackList
getSteps()
int
hashCode()