task function

  1. @Deprecated('Use the task annotations instead.')
void task (String name, [ Function taskFunction, List<String> depends = const [] ])

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(new GrinderTask(name,
      taskFunction: taskFunction,
      depends: depends.map((dep) => new TaskInvocation(dep))));
}