# PmdExtension

abstract class PmdExtension : CodeQualityExtension(source)

Configuration options for the PMD plugin.

#### See also

PmdPlugin

## Constructors

PmdExtension
Link copied to clipboard
constructor(project: Project)

## Properties

reportsDir
Link copied to clipboard
open var reportsDir: File
ruleSetConfig
Link copied to clipboard
@get:Nullable
open var ruleSetConfig: TextResource
sourceSets
Link copied to clipboard
open var sourceSets: Collection<SourceSet>
targetJdk
Link copied to clipboard
open var targetJdk: TargetJdk
toolVersion
Link copied to clipboard
open var toolVersion: String

## Functions

getIncrementalAnalysis
Link copied to clipboard
abstract fun getIncrementalAnalysis(): Property<Boolean>
Controls whether to use incremental analysis or not.
getMaxFailures
Link copied to clipboard
abstract fun getMaxFailures(): Property<Integer>
The maximum number of failures to allow before stopping the build.
getRuleSetFiles
Link copied to clipboard
open fun getRuleSetFiles(): FileCollection
The custom rule set files to be used.
getRuleSets
Link copied to clipboard
open fun getRuleSets(): List<String>
The built-in rule sets to be used.
getRulesMinimumPriority
Link copied to clipboard
abstract fun getRulesMinimumPriority(): Property<Integer>
The rule priority threshold; violations for rules with a lower priority will not be reported.
getThreads
Link copied to clipboard
abstract fun getThreads(): Property<Integer>
The number of threads used by PMD.
isConsoleOutput
Link copied to clipboard
open fun isConsoleOutput(): Boolean
Whether or not to write PMD results to `System.out`.
isIgnoreFailures
Link copied to clipboard
open fun isIgnoreFailures(): Boolean
Whether to allow the build to continue if there are warnings.
ruleSetFiles
Link copied to clipboard
open fun ruleSetFiles(@Nullable ruleSetFiles: Array<@Nullable Any>)
Convenience method for adding rule set files.
ruleSets
Link copied to clipboard
open fun ruleSets(ruleSets: Array<String>)
Convenience method for adding rule sets.
setConsoleOutput
Link copied to clipboard
open fun setConsoleOutput(consoleOutput: Boolean)
Whether or not to write PMD results to `System.out`.
setIgnoreFailures
Link copied to clipboard
open fun setIgnoreFailures(ignoreFailures: Boolean)
Whether to allow the build to continue if there are warnings.
setRuleSetFiles
Link copied to clipboard
open fun setRuleSetFiles(ruleSetFiles: FileCollection)
The custom rule set files to be used.
setRuleSets
Link copied to clipboard
open fun setRuleSets(ruleSets: List<String>)
The built-in rule sets to be used.
setTargetJdk
Link copied to clipboard
open fun setTargetJdk(value: Any)
Sets the target jdk used with pmd.