gradle
8.6

# ReportingExtension

abstract class ReportingExtension(source)

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

Example usage:

    reporting {
        baseDir "$buildDir/our-reports"
    }

Content copied to clipboard

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

## Constructors

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

## Properties

baseDirectory
Link copied to clipboard
val baseDirectory: DirectoryProperty
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 getBuildDir ({@value}).
NAME
Link copied to clipboard
val NAME: String = "reporting"
The name of this extension ("{@value}")
reports
Link copied to clipboard
@get:Incubating
val reports: ExtensiblePolymorphicDomainObjectContainer<ReportSpec>

## Functions

file
Link copied to clipboard
open fun file(path: String): File
Creates a file object for the given path, relative to getBaseDir.
getApiDocTitle
Link copied to clipboard
open fun getApiDocTitle(): String
getBaseDir
Link copied to clipboard
open fun getBaseDir(): File
The base directory for all reports This value can be changed, so any files derived from this should be calculated on demand.
setBaseDir
Link copied to clipboard
open fun setBaseDir(baseDir: File)
Sets the base directory to use for all reports
open fun setBaseDir(baseDir: Any)
Sets the base directory to use for all reports The value will be converted to a `File` on demand via file.