task function
Add a new task definition to the global Grinder instance. A name
is
required. If specified, a taskFunction
is invoked when the task starts.
Any dependencies of the task, that need to run before it, should be passed
in via depends
.
Implementation
@Deprecated('Use the task annotations instead.')
void task(String name,
[Function? taskFunction, List<String> depends = const []]) {
grinder.addTask(GrinderTask(name,
taskFunction: taskFunction,
depends: depends.map((dep) => TaskInvocation(dep))));
}