Chapter 32. The Project Report Plugin

The Project report plugin is currently a work in progress, and at this stage doesn't do particularly much. We plan to add much more to these reports in future releases of Gradle.

The Project report plugin adds some tasks to your project which generate reports containing useful information about your build. Those tasks generate exactly the same content as the command line reports triggered by gradle tasks, gradle dependencies and gradle properties (seeSection 10.5, “Obtaining information about your build”). In contrast to the command line reports, the report plugin generates the reports into a file. There is also an aggregating task that depends on all report tasks added by the plugin.

32.1. Usage

To use the Project report plugin, include in your build script:

apply plugin: 'project-report'

32.2. Tasks

The project report plugin defines the following tasks:

Table 32.1. Project report plugin - tasks

Task name Depends on Type Description
dependencyReport - DependencyReportTask Generates the project dependency report.
propertyReport - PropertyReportTask Generates the project property report.
taskReport - TaskReportTask Generates the project task report.
projectReport dependencyReport, propertyReport, taskReport Task Generates all project reports.

32.3. Project layout

The project report plugin does not require any particular project layout.

32.4. Dependency management

The project report plugin does not define any dependency configurations.

32.5. Convention properties

The project report defines the following convention properties:

Table 32.2. Project report plugin - convention properties

Property name Type Default value Description
reportsDirName String reports The name of the directory to generate reports into, relative to the build directory.
reportsDir File (read-only) buildDir/reportsDirName The directory to generate reports into.
projects Set<Project> A one element set with the project the plugin was applied to. The projects to generate the reports for.
projectReportDirName String project The name of the directory to generate the project report into, relative to the reports directory.
projectReportDir File (read-only) reportsDir/projectReportDirName The directory to generate the project report into.

These convention properties are provided by a convention object of type ProjectReportsPluginConvention.