The PMD plugin performs quality checks on your project's Java source files using PMD and generates reports from these checks.
To use the PMD plugin, include in your build script:
The plugin adds a number of tasks to the project that perform the quality checks. You can execute the checks by running gradle check
.
The PMD plugin adds the following tasks to the project:
Table 33.1. PMD plugin - tasks
The PMD plugin adds the following dependencies to tasks defined by the Java plugin.
Table 33.2. PMD plugin - additional task dependencies
Task name | Depends on |
check |
All PMD tasks, including pmdMain and pmdTest . |
The PMD plugin adds the following dependency configurations:
Table 33.3. PMD plugin - dependency configurations
Name | Meaning |
pmd
|
The PMD libraries to use |
See PmdExtension
.