use of org.gradle.model.internal.core.ModelRuleExecutionException in project gradle by gradle.
the class DefaultModelRegistry method fireAction.
private void fireAction(RuleBinder boundMutator) {
final List<ModelView<?>> inputs = toViews(boundMutator.getInputBindings(), boundMutator.getAction().getDescriptor());
ModelBinding subjectBinding = boundMutator.getSubjectBinding();
final ModelNodeInternal node = subjectBinding.getNode();
final ModelAction mutator = boundMutator.getAction();
ModelRuleDescriptor descriptor = mutator.getDescriptor();
LOGGER.debug("Project {} - Mutating {} using {}", projectPath, node.getPath(), descriptor);
try {
RuleContext.run(descriptor, new Runnable() {
@Override
public void run() {
mutator.execute(node, inputs);
}
});
} catch (Throwable e) {
// TODO some representation of state of the inputs
throw new ModelRuleExecutionException(descriptor, e);
}
}
Aggregations