Package: org.gradle.api.tasks.diagnostics

## [Java] Class AbstractReportTask

- org.gradle.api.tasks.diagnostics.AbstractReportTask

- The base class for all project report tasks.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `protected AbstractReportTask ()`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `generate()`
    `protected void` | `generate(Project project)`
    `File` | `getOutputFile()` Returns the file which the report will be written to.
    `Set<Project>` | `getProjects()` Returns the set of project to generate this report for.
    `protected ReportRenderer` | `getRenderer()`
    `protected StyledTextOutputFactory` | `getTextOutputFactory()`
    `void` | `setOutputFile(File outputFile)` Sets the file which the report will be written to.
    `void` | `setProjects(Set<Project> projects)` Specifies the set of projects to generate this report for.

- - ### Constructor Detail

    - #### protected AbstractReportTask()

  - ### Method Detail

    - #### @TaskAction public void generate()

    - #### protected void generate(Project project)

    - #### @OutputFile @Optional public File getOutputFile()

      Returns the file which the report will be written to. When set to `null`, the report is written to `System.out`. Defaults to `null`.

      Returns:
        The output file. May be null.

    - #### public Set<Project> getProjects()

      Returns the set of project to generate this report for. By default, the report is generated for the task's containing project.

      Returns:
        The set of files.

    - #### protected ReportRenderer getRenderer()

    - #### @Inject protected StyledTextOutputFactory getTextOutputFactory()

    - #### public void setOutputFile(File outputFile)

      Sets the file which the report will be written to. Set this to `null` to write the report to `System.out`.

      Parameters:
        `outputFile` - The output file. May be null.

    - #### public void setProjects(Set<Project> projects)

      Specifies the set of projects to generate this report for.

      Parameters:
        `projects` - The set of projects. Must not be null.