GrinderTask constructor
GrinderTask(})
Create a new GrinderTask.
Items in depends
represent task dependencies. They can either be
String names of tasks (without arguments), or full TaskInvocations.
Implementation
GrinderTask(
this.name, {
this.taskFunction,
this.description,
Iterable<dynamic> depends = const [],
}) : depends = UnmodifiableListView(
depends.map((dep) => dep is String ? TaskInvocation(dep) : dep)) {
if (taskFunction == null && depends.isEmpty) {
throw GrinderException(
'GrinderTasks must have a task function or dependencies.');
}
}