PmdExtension - Gradle DSL Version 2.14.1

# PmdExtension

API Documentation: | `PmdExtension`

Configuration options for the PMD plugin.

### Properties

Property | Description
`consoleOutput` | Incubating Whether or not to write PMD results to `System.out`.
`ignoreFailures` | Whether or not to allow the build to continue if there are warnings. Example: ignoreFailures = true
`reportsDir` | The directory where reports will be generated.
`rulePriority` | Incubating The rule priority threshold; violations for rules with a lower priority will not be reported. Default value is 5, which means that all violations will be reported. This is equivalent to PMD's Ant task minimumPriority property. See the official documentation for the list of priorities. Example: rulePriority = 3
`ruleSetConfig` | Incubating The custom rule set to be used (if any). Replaces `ruleSetFiles`, except that it does not currently support multiple rule sets. See the official documentation for how to author a rule set. Example: ruleSetConfig = resources.text.fromFile("config/pmd/myRuleSet.xml")
`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")
`ruleSets` | The built-in rule sets to be used. See the official list of built-in rule sets. Example: ruleSets = ["basic", "braces"]
`sourceSets` | The source sets to be analyzed as part of the `check` and `build` tasks.
`targetJdk` | The target jdk to use with pmd, 1.3, 1.4, 1.5, 1.6, 1.7 or jsp
`toolVersion` | The version of the code quality tool to be used.

### Methods

Method | Description
`ruleSetFiles(ruleSetFiles)` | Convenience method for adding rule set files. Example: ruleSetFiles "config/pmd/myRuleSet.xml"
`ruleSets(ruleSets)` | Convenience method for adding rule sets. Example: ruleSets "basic", "braces"

### Script blocks

No script blocks

### Property details

#### `boolean` `consoleOutput`

Note: This property is incubating and may change in a future version of Gradle.

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

Default:
  `false`

#### `boolean` `ignoreFailures`

Whether or not to allow the build to continue if there are warnings. Example: ignoreFailures = true

#### `File` `reportsDir`

The directory where reports will be generated.

#### `int` `rulePriority`

Note: This property is incubating and may change in a future version of Gradle.

The rule priority threshold; violations for rules with a lower priority will not be reported. Default value is 5, which means that all violations will be reported. This is equivalent to PMD's Ant task minimumPriority property. See the official documentation for the list of priorities. Example: rulePriority = 3

Default:
  `5`

#### `TextResource` `ruleSetConfig`

Note: This property is incubating and may change in a future version of Gradle.

The custom rule set to be used (if any). Replaces `ruleSetFiles`, except that it does not currently support multiple rule sets. See the official documentation for how to author a rule set. Example: ruleSetConfig = resources.text.fromFile("config/pmd/myRuleSet.xml")

Default:
  `null`

#### `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")

Default:
  `[]`

#### ``List`<`String`>` `ruleSets`

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

Default:
  `["basic"]`

#### ``Collection`<`SourceSet`>` `sourceSets`

The source sets to be analyzed as part of the `check` and `build` tasks.

Default:
  `project.sourceSets`

#### `TargetJdk` `targetJdk`

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

Default:
  `project.sourceCompatibility`

#### `String` `toolVersion`

The version of the code quality tool to be used.

### Method details

#### `void` `ruleSetFiles`(``Object`...` ruleSetFiles)

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

#### `void` `ruleSets`(``String`...` ruleSets)

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