public class ReportingExtension extends Object
Example usage:
reporting { baseDir "$buildDir/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.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_REPORTS_DIR_NAME
The default name of the base directory for all reports, relative to
Project.getBuildDir() ("reports"). |
static String |
NAME
The name of this extension (""reporting"")
|
Constructor and Description |
---|
ReportingExtension(Project project) |
Modifier and Type | Method and Description |
---|---|
File |
file(String path)
Creates a file object for the given path, relative to
getBaseDir() . |
String |
getApiDocTitle() |
File |
getBaseDir()
The base directory for all reports
|
void |
setBaseDir(Object baseDir)
Sets the base directory to use for all reports
|
public static final String NAME
public static final String DEFAULT_REPORTS_DIR_NAME
Project.getBuildDir()
("reports").public ReportingExtension(Project project)
public File getBaseDir()
This value can be changed, so any files derived from this should be calculated on demand.
public void setBaseDir(Object baseDir)
The value will be converted to a File
on demand via Project.file(Object)
.
baseDir
- The base directory to use for all reportspublic File file(String path)
getBaseDir()
.
The reporting base dir can be changed, so users of this method should use it on demand where appropriate.
path
- the relative pathgetBaseDir()
public String getApiDocTitle()