Package org.gradle.api.reporting
Class ReportingExtension
java.lang.Object
org.gradle.api.reporting.ReportingExtension
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
Modifier and TypeFieldDescriptionstatic final String
The default name of the base directory for all reports, relative toProjectLayout.getBuildDirectory()
("reports").static final String
The name of this extension (""reporting"") -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreates a file object for the given path, relative togetBaseDir()
.Deprecated.Returns base directory property to use for all reports.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.usegetBaseDirectory()
property insteadvoid
setBaseDir
(Object baseDir) Deprecated.usegetBaseDirectory()
property instead
-
Field Details
-
NAME
The name of this extension (""reporting"")- See Also:
-
DEFAULT_REPORTS_DIR_NAME
The default name of the base directory for all reports, relative toProjectLayout.getBuildDirectory()
("reports").- See Also:
-
-
Constructor Details
-
ReportingExtension
-
-
Method Details
-
getBaseDir
Deprecated.usegetBaseDirectory()
property insteadThe base directory for all reportsThis value can be changed, so any files derived from this should be calculated on demand.
- Returns:
- The base directory for all reports
-
setBaseDir
Deprecated.usegetBaseDirectory()
property insteadSets the base directory to use for all reports- Parameters:
baseDir
- The base directory to use for all reports- Since:
- 4.0
-
setBaseDir
Deprecated.usegetBaseDirectory()
property insteadSets the base directory to use for all reportsThe value will be converted to a
File
on demand viaProject.file(Object)
.- Parameters:
baseDir
- The base directory to use for all reports
-
getBaseDirectory
Returns base directory property to use for all reports.- Since:
- 4.4
-
file
Creates a file object for the given path, relative togetBaseDir()
.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
-
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
-
getBaseDirectory()
property instead