use of org.gradle.language.base.ProjectSourceSet in project gradle by gradle.
the class ComponentReport method report.
@TaskAction
public void report() {
ProjectInternal project = (ProjectInternal) getProject();
project.prepareForRuleBasedPlugins();
StyledTextOutput textOutput = getTextOutputFactory().create(ComponentReport.class);
ComponentReportRenderer renderer = new ComponentReportRenderer(getFileResolver(), getBinaryRenderer());
renderer.setOutput(textOutput);
ProjectDetails projectDetails = ProjectDetails.of(project);
renderer.startProject(projectDetails);
Collection<ComponentSpec> components = new ArrayList<>();
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(projectDetails);
renderer.complete();
}
Aggregations