use of org.gradle.internal.logging.text.StyledTextOutput 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();
}
use of org.gradle.internal.logging.text.StyledTextOutput in project gradle by gradle.
the class DependentComponentsReport method report.
@TaskAction
public void report() {
// Cross-project ModelRegistry operations do not happen concurrently.
synchronized (DependentComponentsReport.class) {
Project project = getProject();
ModelRegistry modelRegistry = getModelRegistry();
DependentBinariesResolver dependentBinariesResolver = modelRegistry.find("dependentBinariesResolver", DependentBinariesResolver.class);
StyledTextOutput textOutput = getTextOutputFactory().create(DependentComponentsReport.class);
TextDependentComponentsReportRenderer reportRenderer = new TextDependentComponentsReportRenderer(dependentBinariesResolver, showNonBuildable, showTestSuites);
reportRenderer.setOutput(textOutput);
reportRenderer.startProject(project);
Set<ComponentSpec> allComponents = getAllComponents(modelRegistry);
if (showTestSuites) {
allComponents.addAll(getAllTestSuites(modelRegistry));
}
reportRenderer.renderComponents(getReportedComponents(allComponents));
reportRenderer.renderLegend();
reportRenderer.completeProject(project);
reportRenderer.complete();
}
}
use of org.gradle.internal.logging.text.StyledTextOutput in project gradle by gradle.
the class TaskReportRenderer method complete.
@Override
public void complete() {
if (!detail) {
StyledTextOutput output = getTextOutput();
BuildClientMetaData clientMetaData = getClientMetaData();
output.println();
output.text("To see all tasks and more detail, run ");
clientMetaData.describeCommand(output.withStyle(UserInput), "tasks --all");
output.println();
output.println();
output.text("To see more detail about a task, run ");
clientMetaData.describeCommand(output.withStyle(UserInput), "help --task <task>");
output.println();
}
super.complete();
}
use of org.gradle.internal.logging.text.StyledTextOutput in project gradle by gradle.
the class ReportGeneratingProfileListener method renderReportUrl.
private void renderReportUrl(File reportFile) {
StyledTextOutput textOutput = textOutputFactory.create(ReportGeneratingProfileListener.class, LogLevel.LIFECYCLE);
textOutput.println();
String reportUrl = new ConsoleRenderer().asClickableFileUrl(reportFile);
textOutput.formatln("See the profiling report at: %s", reportUrl);
}
Aggregations