Package com.diffplug.spotless
@ParametersAreNonnullByDefault
@ReturnValuesAreNonnullByDefault
package com.diffplug.spotless
-
ClassDescriptionGradle 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. The clean/dirty state of a single file.Computes a signature for any needed files.A view of `FileSignature` which can be safely roundtripped.Finds a foreign executable and checks its version.Formatter which performs the full formatting.AFunction<String, String>
which can throw an exception.Function<String, String>
andBiFunction<String, File, String>
whose implementation requires a resource which should be released when the function is no longer needed.Utility manages settings of formatter configured by properties.An implementation of this class specifies a single step in a formatting process.Abstract class responsible for installing a Git pre-push hook in a repository.Implementation ofGitPrePushHookInstaller
specifically for Gradle-based projects.Implementation ofGitPrePushHookInstaller
specifically for Maven-based projects.Grabs a jar and its dependencies from maven, and makes it easy to access the collection in a classloader.A lazily evaluated JarState, which becomes a set of files when serialized.Java virtual machine helperJvm.Support<V>Utility to map constraints of formatter to this JVMThis is a utility class to allow for lazy evaluation of arguments to be passed to a logger and thus avoid unnecessary computation of the arguments if the log level is not enabled.LazyForwardingEquality<T extends Serializable>Implements equality, hashcode, and serialization entirely in terms of lazily-computed state.Represents the line endings which should be written by the tool.A policy for line endings which can vary based on the specific file being requested.Models a linted line or line range.Any exception which implements this interface will have its lints extracted and reported cleanly to the user.Marker interface to prevent lambda implementations of single-method interfaces that require serializability.An implementation of NoLambda in which equality is based on the serialized representation of itself.Enum to make boolean logic more readable.The kind of result.Shelling out to a process is harder than it ought to be in Java.Many spotless steps require third-party libraries, but we want to keep Spotless' dependencies minimal.A file filter with full support for serialization.SerializedFunction<T,R> Spotless' global cache.These FormatterStep are meant to be used for testing only.Basic functional interfaces which throw exception, along with static helper methods for calling them.ThrowingEx.BiFunction<T1,T2, R> A bi-function that can throw any exception.ThrowingEx.Function<T,R> A function that can throw any exception.A runnable that can throw any exception.A supplier that can throw any exception.A RuntimeException specifically for the purpose of wrapping non-runtime Exceptions as RuntimeExceptions.