# PmdPlugin

abstract class PmdPlugin : AbstractCodeQualityPlugin<T>

A plugin for the PMD source code analyzer.

Declares a `pmd` configuration which needs to be configured with the PMD library to be used.

Declares a `pmdAux` configuration to add transitive compileOnly dependencies to the PMD's auxclasspath. This is only needed if PMD complains about NoClassDefFoundError during type resolution.

For each source set that is to be analyzed, a Pmd task is created and configured to analyze all Java code.

All PMD tasks (including user-defined ones) are added to the `check` lifecycle task.

#### See also

PmdExtension
Pmd
<a href="https://docs.gradle.org/current/userguide/pmd_plugin.html">PMD plugin reference</a>

## Constructors

PmdPlugin
Link copied to clipboard
constructor()

## Properties

DEFAULT_PMD_VERSION
Link copied to clipboard
val DEFAULT_PMD_VERSION: String = "7.13.0"

## Functions

apply
Link copied to clipboard
fun apply(project: ProjectInternal)
getDefaultTargetJdk
Link copied to clipboard
open fun getDefaultTargetJdk(javaVersion: JavaVersion): TargetJdk