Package org.gradle.api.reporting

# 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 Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `DEFAULT_REPORTS_DIR_NAME`
  The default name of the base directory for all reports, relative to `ProjectLayout.getBuildDirectory()` ("reports").
  `static final String`
  `NAME`
  The name of this extension (""reporting"")

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ReportingExtension(Project project)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `File`
  `file(String path)`
  Creates a file object for the given path, relative to `getBaseDir()`.
  `String`
  `getApiDocTitle()`
  `File`
  `getBaseDir()`
  Deprecated.
  use `getBaseDirectory()` property instead
  `DirectoryProperty`
  `getBaseDirectory()`
  Returns base directory property to use for all reports.
  `ExtensiblePolymorphicDomainObjectContainer<ReportSpec>`
  `getReports()`
  Container for aggregation reports, which may be configured automatically in reaction to the presence of the jvm-test-suite plugin.
  `void`
  `setBaseDir(File baseDir)`
  Deprecated.
  use `getBaseDirectory()` property instead
  `void`
  `setBaseDir(Object baseDir)`
  Deprecated.
  use `getBaseDirectory()` property instead

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### NAME

    public static final String NAME
    The name of this extension (""reporting"")
    See Also:
      - Constant Field Values

  - ### DEFAULT_REPORTS_DIR_NAME

    public static final String DEFAULT_REPORTS_DIR_NAME
    The default name of the base directory for all reports, relative to `ProjectLayout.getBuildDirectory()` ("reports").
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### ReportingExtension

    @Inject public ReportingExtension(Project project)

- ## Method Details

  - ### getBaseDir

    @Deprecated public File getBaseDir()
    Deprecated.
    use `getBaseDirectory()` property instead
    The base directory for all reports

    This value can be changed, so any files derived from this should be calculated on demand.

    Returns:
      The base directory for all reports

  - ### setBaseDir

    @Deprecated public void setBaseDir(File baseDir)
    Deprecated.
    use `getBaseDirectory()` property instead
    Sets the base directory to use for all reports
    Parameters:
      `baseDir` - The base directory to use for all reports
    Since:
      4.0

  - ### setBaseDir

    @Deprecated public void setBaseDir(Object baseDir)
    Deprecated.
    use `getBaseDirectory()` property instead
    Sets the base directory to use for all reports

    The value will be converted to a `File` on demand via `Project.file(Object)`.

    Parameters:
      `baseDir` - The base directory to use for all reports

  - ### 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 `getBaseDir()`.

    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 `getBaseDir()`

  - ### getApiDocTitle

    public String getApiDocTitle()

  - ### getReports

    @Incubating public ExtensiblePolymorphicDomainObjectContainer<ReportSpec> 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