if (unlessCondition != null && unlessCondition.eval()) {
project.log(this, "Skipped because property '"
+ project.replaceProperties(unlessString) + "' set.", Project.MSG_VERBOSE);
return;
}
LocalProperties localProperties = LocalProperties.get(getProject());
localProperties.enterScope();
try {
// use index-based approach to avoid ConcurrentModificationExceptions;
// also account for growing target children
// do not optimize this loop by replacing children.size() by a variable
// as children can be added dynamically as in RhinoScriptTest where a target is adding work for itself
for (int i = 0; i < children.size(); i++) {
Object o = children.get(i);
if (o instanceof Task) {
Task task = (Task) o;
task.perform();
} else {
((RuntimeConfigurable) o).maybeConfigure(project);
}
}
} finally {
localProperties.exitScope();
}
}