}
private Task createTask(String name, final Task... dependsOn) {
final TaskInternal task = AbstractTask.injectIntoNewInstance(root, name, new Callable<TaskInternal>() {
public TaskInternal call() throws Exception {
return new DefaultTask();
}
});
task.dependsOn((Object[]) dependsOn);
task.doFirst(new Action<Task>() {
public void execute(Task task) {