Chapter 39. The Project Report Plugin

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 11.6, “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.

We plan to add much more to the existing reports and create additional ones in future releases of Gradle.

39.1. Usage

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

apply plugin: 'project-report'

39.2. Tasks

The project report plugin defines the following tasks:

Table 39.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.

39.3. Project layout

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

39.4. Dependency management

The project report plugin does not define any dependency configurations.

39.5. Convention properties

The project report defines the following convention properties:

Table 39.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.