use of org.gradle.api.reporting.components.internal.ComponentReportRenderer in project gradle by gradle.
the class ComponentReport method report.
@TaskAction
public void report() {
Project project = getProject();
StyledTextOutput textOutput = getTextOutputFactory().create(ComponentReport.class);
ComponentReportRenderer renderer = new ComponentReportRenderer(getFileResolver(), getBinaryRenderer());
renderer.setOutput(textOutput);
renderer.startProject(project);
Collection<ComponentSpec> components = new ArrayList<ComponentSpec>();
ComponentSpecContainer componentSpecs = modelElement("components", ComponentSpecContainer.class);
if (componentSpecs != null) {
components.addAll(componentSpecs.values());
}
ModelMap<ComponentSpec> testSuites = modelElement("testSuites", modelMap(ComponentSpec.class));
if (testSuites != null) {
components.addAll(testSuites.values());
}
renderer.renderComponents(components);
ProjectSourceSet sourceSets = modelElement("sources", ProjectSourceSet.class);
if (sourceSets != null) {
renderer.renderSourceSets(sourceSets);
}
BinaryContainer binaries = modelElement("binaries", BinaryContainer.class);
if (binaries != null) {
renderer.renderBinaries(binaries.values());
}
renderer.completeProject(project);
renderer.complete();
}
Aggregations