# ReportingExtension

abstract class ReportingExtension

A project extension named "reporting" that provides basic reporting settings and utilities.

Example usage:

    plugins {
        id("org.gradle.reporting-base")
    }

    reporting {
        // change the base directory where all reports are generated
        baseDirectory = layout.buildDirectory.dir("our-reports")
    }

    // A directory for test reports
    reporting.baseDirectory.dir("test-reports")

    // A report file
    reporting.baseDirectory.file("index.html")

Content copied to clipboard

When implementing a task that produces reports, the location of where to generate reports should be obtained from getBaseDirectory.

## Constructors

ReportingExtension
Link copied to clipboard
@Inject
constructor(project: Project)

## Properties

DEFAULT_REPORTS_DIR_NAME
Link copied to clipboard
val DEFAULT_REPORTS_DIR_NAME: String = "reports"
The default name of the base directory for all reports, relative to getBuildDirectory ({@value}).
NAME
Link copied to clipboard
val NAME: String = "reporting"
The name of this extension ("{@value}")

## Functions

file
Link copied to clipboard
open fun file(path: String): File
Creates a file object for the given path, relative to getBaseDirectory.
getApiDocTitle
Link copied to clipboard
open fun getApiDocTitle(): String
Provides a default title for API documentation based on the project's name and version.
getBaseDirectory
Link copied to clipboard
abstract fun getBaseDirectory(): DirectoryProperty
Returns base directory property to use for all reports.
getReports
Link copied to clipboard
@Incubating
abstract fun getReports(): ExtensiblePolymorphicDomainObjectContainer<ReportSpec>
Container for aggregation reports, which may be configured automatically in reaction to the presence of the jvm-test-suite plugin.
reports
Link copied to clipboard
@Incubating
open fun reports(action: Action<in ExtensiblePolymorphicDomainObjectContainer<ReportSpec>>)
Add more reports or configure the available reports.