public class Delete
extends org.gradle.api.internal.ConventionTask
Deletes files or directories. Example:
task makePretty(type: Delete) { delete 'uglyFolder', 'uglyFile' }
Task.Namer
TASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
Constructor and Description |
---|
Delete() |
Modifier and Type | Method and Description |
---|---|
protected void |
clean() |
Delete |
delete(Object... targets)
Adds some files to be deleted by this task.
|
Set<Object> |
getDelete()
Returns the set of files which will be deleted by this task.
|
FileCollection |
getTargetFiles()
Returns the resolved set of files which will be deleted by this task.
|
void |
setDelete(Object target)
Sets the files to be deleted by this task.
|
conventionMapping, conventionMapping, getConventionMapping
addValidator, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doLast, doLast, execute, executeWithoutThrowingTaskFailure, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getInputs, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, leftShift, mustRunAfter, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setMustRunAfter, setName, setOnlyIf, setOnlyIf, setProject, setProperty, setShouldRunAfter, shouldRunAfter, toString
protected void clean()
public FileCollection getTargetFiles()
public Set<Object> getDelete()
public void setDelete(Object target)
target
- Any type of object accepted by Project.files(Object...)
public Delete delete(Object... targets)
Project.files(Object...)
.targets
- Any type of object accepted by Project.files(Object...)