Class ReportingExtension

java.lang.Object
org.gradle.api.reporting.ReportingExtension

public abstract class ReportingExtension extends Object
A project extension named "reporting" that provides basic reporting settings and utilities.

Example usage:

 reporting {
     baseDirectory = layout.buildDirectory.dir("our-reports")
 }
 

When implementing a task that produces reports, the location of where to generate reports should be obtained via the file(String) method of this extension.

  • Field Details

  • Constructor Details

    • ReportingExtension

      @Inject public ReportingExtension(Project project)
  • Method Details

    • getBaseDirectory

      public DirectoryProperty getBaseDirectory()
      Returns base directory property to use for all reports.
      Since:
      4.4
    • file

      public File file(String path)
      Creates a file object for the given path, relative to getBaseDirectory().

      The reporting base dir can be changed, so users of this method should use it on demand where appropriate.

      Parameters:
      path - the relative path
      Returns:
      a file object at the given path relative to getBaseDirectory().
    • getApiDocTitle

      public String getApiDocTitle()
    • getReports

      Container for aggregation reports, which may be configured automatically in reaction to the presence of the jvm-test-suite plugin.
      Returns:
      A container of known aggregation reports
      Since:
      7.4