Chapter 29. The Project Report Plugin

Table of Contents

29.1. Usage
29.2. Tasks
29.3. Project layout
29.4. Dependency management
29.5. Convention properties

The Project report plugin adds some tasks to your project which generate reports containing useful information about your build. These tasks generate the same content that you get by executing the tasks, dependencies, and properties tasks from the command line (see Section 4.7, “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.

29.1. Usage

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

apply plugin: 'project-report'

29.2. Tasks

The project report plugin defines the following tasks:

Table 29.1. Project report plugin - tasks

Task name Depends on Type Description
dependencyReport - DependencyReportTask Generates the project dependency report.
htmlDependencyReport - HtmlDependencyReportTask Generates an HTML dependency and dependency insight report for the project or a set of projects.
propertyReport - PropertyReportTask Generates the project property report.
taskReport - TaskReportTask Generates the project task report.
projectReport dependencyReport, propertyReport, taskReport, htmlDependencyReport Task Generates all project reports.

29.3. Project layout

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

29.4. Dependency management

The project report plugin does not define any dependency configurations.

29.5. Convention properties

The project report defines the following convention properties:

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