matlab.buildtool.tasks.CleanTask Class
Namespace: matlab.buildtool.tasks
Superclasses: matlab.buildtool.Task
Description
The matlab.buildtool.tasks.CleanTask
class provides a task for deleting
task outputs as well as traces of tasks that support incremental builds. When you delete the
trace of a task, the build tool no longer considers the task as up to date.
You can run a CleanTask
instance without an argument to delete the outputs
and traces of all other tasks in the build plan, or with an argument to delete the outputs and
traces of specified tasks. For more information, see Run CleanTask Instance.
Creation
Description
task = matlab.buildtool.tasks.CleanTask
creates a
task for deleting outputs and traces of tasks.
task = matlab.buildtool.tasks.CleanTask(Name=Value)
sets the Description
and Dependencies
properties, which the class inherits from the Task
class,
using one or more name-value arguments. For example, task =
matlab.buildtool.tasks.CleanTask(Description="Reset tasks")
creates a task
with the specified description for deleting task outputs and traces.
The CleanTask
class also inherits the other properties of the
Task
class, but you cannot set those properties during task
creation.
Examples
More About
Tips
You cannot overwrite or remove the actions of a built-in task, but you can specify additional task actions. For example, append an action to the
Actions
property of a built-in task.plan("myTask").Actions(end+1) = @myAction;