Package com.diffplug.gradle.spotless
Class SpotlessTask
- java.lang.Object
-
- org.gradle.api.internal.AbstractTask
-
- org.gradle.api.DefaultTask
-
- com.diffplug.gradle.spotless.SpotlessTask
-
- All Implemented Interfaces:
Comparable<Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.TaskInternal,ExtensionAware,Task,org.gradle.util.Configurable<Task>
- Direct Known Subclasses:
SpotlessTaskImpl
public abstract class SpotlessTask extends DefaultTask
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.gradle.api.Task
Task.Namer
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringencodingprotected FormatExceptionPolicyexceptionPolicyprotected com.diffplug.gradle.spotless.JvmLocalCache.LiveCache<LineEnding.Policy>lineEndingsPolicyprotected FileoutputDirectoryprotected StringratchetFromStored so that the configuration cache can recreate the GitRatchetGradle state.protected com.diffplug.gradle.spotless.JvmLocalCache.LiveCache<List<FormatterStep>>stepsprotected FileCollectiontarget-
Fields inherited from interface org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
-
-
Constructor Summary
Constructors Constructor Description SpotlessTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddStep(FormatterStep step)protected <T> com.diffplug.gradle.spotless.JvmLocalCache.LiveCache<T>createLive(String keyName)StringgetEncoding()FormatExceptionPolicygetExceptionPolicy()LineEnding.PolicygetLineEndingsPolicy()FilegetOutputDirectory()org.eclipse.jgit.lib.ObjectIdgetRatchetSha()List<FormatterStep>getSteps()FileCollectiongetTarget()voidsetEncoding(String encoding)voidsetExceptionPolicy(FormatExceptionPolicy exceptionPolicy)voidsetLineEndingsPolicy(LineEnding.Policy lineEndingsPolicy)voidsetSteps(List<FormatterStep> steps)voidsetTarget(Iterable<File> target)voidsetupRatchet(String ratchetFrom)-
Methods inherited from class org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
-
Methods inherited from class org.gradle.api.internal.AbstractTask
appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getOnlyIf, getReasonNotToTrackState, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, prependParallelSafeAction, setImpliesSubProjects
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.gradle.api.Task
doNotTrackState, getConvention
-
-
-
-
Field Detail
-
encoding
protected String encoding
-
lineEndingsPolicy
protected final com.diffplug.gradle.spotless.JvmLocalCache.LiveCache<LineEnding.Policy> lineEndingsPolicy
-
ratchetFrom
protected String ratchetFrom
Stored so that the configuration cache can recreate the GitRatchetGradle state.
-
exceptionPolicy
protected FormatExceptionPolicy exceptionPolicy
-
target
protected FileCollection target
-
outputDirectory
protected File outputDirectory
-
steps
protected final com.diffplug.gradle.spotless.JvmLocalCache.LiveCache<List<FormatterStep>> steps
-
-
Method Detail
-
createLive
protected <T> com.diffplug.gradle.spotless.JvmLocalCache.LiveCache<T> createLive(String keyName)
-
setEncoding
public void setEncoding(String encoding)
-
getLineEndingsPolicy
@Input public LineEnding.Policy getLineEndingsPolicy()
-
setLineEndingsPolicy
public void setLineEndingsPolicy(LineEnding.Policy lineEndingsPolicy)
-
setupRatchet
public void setupRatchet(String ratchetFrom)
-
getRatchetSha
@Input public org.eclipse.jgit.lib.ObjectId getRatchetSha()
-
setExceptionPolicy
public void setExceptionPolicy(FormatExceptionPolicy exceptionPolicy)
-
getExceptionPolicy
@Input public FormatExceptionPolicy getExceptionPolicy()
-
getTarget
@PathSensitive(RELATIVE) @Incremental @InputFiles public FileCollection getTarget()
-
getOutputDirectory
@OutputDirectory public File getOutputDirectory()
-
getSteps
@Input public List<FormatterStep> getSteps()
-
setSteps
public void setSteps(List<FormatterStep> steps)
-
addStep
public boolean addStep(FormatterStep step)
-
-