Package: org.gradle.api.plugins.quality

## [Groovy] Class PmdExtension

- org.gradle.api.plugins.quality.PmdExtension

- Configuration options for the PMD plugin.

  See Also:
    PmdPlugin

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `boolean` | `consoleOutput` Whether or not to write PMD results to `System.out`.
    `FileCollection` | `ruleSetFiles` The custom rule set files to be used.
    `List<String>` | `ruleSets` The built-in rule sets to be used.
    `TargetJdk` | `targetJdk` The target jdk to use with pmd, 1.3, 1.4, 1.5, 1.6, 1.7 or jsp

  - ### Constructor Summary

    Constructors
    Constructor and description
    `PmdExtension (Project project)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `ruleSetFiles(Object... ruleSetFiles)` Convenience method for adding rule set files.
    `void` | `ruleSets(String... ruleSets)` Convenience method for adding rule sets.
    `void` | `setTargetJdk(def value)` Sets the target jdk used with pmd.

- - ### Property Detail

    - #### @Incubating boolean consoleOutput

      Whether or not to write PMD results to `System.out`.

    - #### FileCollection ruleSetFiles

      The custom rule set files to be used. See the official documentation for how to author a rule set file. Example: ruleSetFiles = files("config/pmd/myRuleSet.xml")

    - #### List<String> ruleSets

      The built-in rule sets to be used. See the official list of built-in rule sets. Example: ruleSets = ["basic", "braces"]

    - #### TargetJdk targetJdk

      The target jdk to use with pmd, 1.3, 1.4, 1.5, 1.6, 1.7 or jsp

  - ### Constructor Detail

    - #### PmdExtension(Project project)

  - ### Method Detail

    - #### void ruleSetFiles(Object... ruleSetFiles)

      Convenience method for adding rule set files. Example: ruleSetFiles "config/pmd/myRuleSet.xml"

      Parameters:
        `ruleSetFiles` - the rule set files to be added

    - #### void ruleSets(String... ruleSets)

      Convenience method for adding rule sets. Example: ruleSets "basic", "braces"

      Parameters:
        `ruleSets` - the rule sets to be added

    - #### void setTargetJdk(def value)

      Sets the target jdk used with pmd.

      value:
        The value for the target jdk as defined by TargetJdk.toVersion