Table of Contents
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 the following 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
.
Note that PMD will run with the same Java version used to run Gradle.
The PMD plugin adds the following tasks to the project:
PMD plugin - tasks
The PMD plugin adds the following dependencies to tasks defined by the Java plugin.
PMD plugin - additional task dependencies
Task name | Depends on |
|
All PMD tasks, including |
The PMD plugin adds the following dependency configurations:
PMD plugin - dependency configurations
Name | Meaning |
|
The PMD libraries to use |
See the PmdExtension
class in the API documentation.