Search in sources :

Example 1 with HtmlPageBuilder

use of org.gradle.reporting.HtmlPageBuilder in project gradle by gradle.

the class BuildDashboardGenerator method render.

@Override
public void render(Collection<Report> reports, final File outputFile) {
    this.reports = new TreeSet<Report>(new Comparator<Report>() {

        public int compare(Report o1, Report o2) {
            return o1.getDisplayName().compareTo(o2.getDisplayName());
        }
    });
    this.reports.addAll(reports);
    this.outputFile = outputFile;
    HtmlReportRenderer renderer = new HtmlReportRenderer();
    renderer.renderRawSinglePage(reports, new ReportRenderer<Collection<Report>, HtmlPageBuilder<Writer>>() {

        @Override
        public void render(Collection<Report> model, HtmlPageBuilder<Writer> builder) throws IOException {
            generate(builder);
        }
    }, outputFile);
}
Also used : Report(org.gradle.api.reporting.Report) DirectoryReport(org.gradle.api.reporting.DirectoryReport) HtmlPageBuilder(org.gradle.reporting.HtmlPageBuilder) IOException(java.io.IOException) HtmlReportRenderer(org.gradle.reporting.HtmlReportRenderer) Writer(java.io.Writer)

Aggregations

IOException (java.io.IOException)1 Writer (java.io.Writer)1 DirectoryReport (org.gradle.api.reporting.DirectoryReport)1 Report (org.gradle.api.reporting.Report)1 HtmlPageBuilder (org.gradle.reporting.HtmlPageBuilder)1 HtmlReportRenderer (org.gradle.reporting.HtmlReportRenderer)1