use of org.gradle.api.tasks.diagnostics.internal.graph.nodes.DefaultSection in project gradle by gradle.
the class DependencyInsightReporter method buildFailureSection.
private static void buildFailureSection(DependencyEdge edge, Set<Throwable> alreadyReportedErrors, List<Section> sections) {
if (edge instanceof UnresolvedDependencyEdge) {
UnresolvedDependencyEdge unresolved = (UnresolvedDependencyEdge) edge;
Throwable failure = unresolved.getFailure();
DefaultSection failures = new DefaultSection("Failures");
String errorMessage = collectErrorMessages(failure, alreadyReportedErrors);
failures.addChild(new DefaultSection(errorMessage));
sections.add(failures);
}
}
use of org.gradle.api.tasks.diagnostics.internal.graph.nodes.DefaultSection in project gradle by gradle.
the class DependencyInsightReporter method buildSelectionReasonSection.
private static DefaultSection buildSelectionReasonSection(ComponentSelectionReason reason) {
DefaultSection selectionReasons = new DefaultSection("Selection reasons");
for (ComponentSelectionDescriptor entry : reason.getDescriptions()) {
ComponentSelectionDescriptorInternal descriptor = (ComponentSelectionDescriptorInternal) entry;
boolean hasCustomDescription = descriptor.hasCustomDescription();
if (ComponentSelectionReasons.isCauseExpected(descriptor) && !hasCustomDescription) {
// Don't render empty 'requested' reason
continue;
}
Section item = new DefaultSection(render(descriptor));
selectionReasons.addChild(item);
}
return selectionReasons;
}
Aggregations