matlab.buildtool.Task class
Package: matlab.buildtool
Description
The matlab.buildtool.Task
class represents a single unit of work in a
build, such as identifying code issues, running tests, and packaging a toolbox.
A task has three fundamental characteristics:
Name — The name of a task uniquely identifies the task in a build plan.
Dependencies — The dependencies of a task are other tasks in the plan that must run before the task runs.
Actions — The actions of a task define functions that execute when the task runs.
To run a task, the build runner first runs all its dependencies and then performs actions
of the task in the order they appear in the Actions
property.
Creation
Description
task = matlab.buildtool.Task
returns a
Task
object whose properties have their default values.
task = matlab.buildtool.Task(
sets properties using
one or more name-value arguments. However, you cannot use this syntax to set the
Name=Value
)Name
property. For example, task =
matlab.buildtool.Task(Actions=@(~)assertSuccess(runtests))
creates a task that
runs the tests in your current folder and fails if any of the tests fail.