use of org.gradle.model.internal.core.UnmanagedModelProjection in project gradle by gradle.
the class DefaultTaskContainer method addPlaceholderAction.
public <T extends TaskInternal> void addPlaceholderAction(final String placeholderName, final Class<T> taskType, final Action<? super T> configure) {
if (!modelNode.hasLink(placeholderName)) {
final ModelType<T> taskModelType = ModelType.of(taskType);
ModelPath path = MODEL_PATH.child(placeholderName);
modelNode.addLink(ModelRegistrations.of(path).action(ModelActionRole.Create, new TaskCreator<T>(placeholderName, taskType, configure, taskModelType)).withProjection(new UnmanagedModelProjection<T>(taskModelType)).descriptor(new SimpleModelRuleDescriptor("tasks.addPlaceholderAction(" + placeholderName + ")")).build());
}
if (findByNameWithoutRules(placeholderName) == null) {
placeholders.add(placeholderName);
}
}
Aggregations