# 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

ruleSetConfig
Link copied to clipboard
@get:Nullable
open var ruleSetConfig: TextResource
targetJdk
Link copied to clipboard
open var targetJdk: TargetJdk

## Functions

getConsoleOutput
Link copied to clipboard
abstract fun getConsoleOutput(): Property<Boolean>
Whether or not to write PMD results to `System.out`.
getIgnoreFailures
Link copied to clipboard
abstract fun getIgnoreFailures(): Property<Boolean>
Whether to allow the build to continue if there are warnings.
getIncrementalAnalysis
Link copied to clipboard
abstract fun getIncrementalAnalysis(): Property<Boolean>
Controls whether to use incremental analysis or not.
getIsConsoleOutput
Link copied to clipboard
open fun getIsConsoleOutput(): Property<Boolean>
getIsIgnoreFailures
Link copied to clipboard
open fun getIsIgnoreFailures(): Property<Boolean>
getMaxFailures
Link copied to clipboard
abstract fun getMaxFailures(): Property<Integer>
The maximum number of failures to allow before stopping the build.
getReportsDir
Link copied to clipboard
abstract fun getReportsDir(): DirectoryProperty
The directory where reports will be generated.
getRuleSetFiles
Link copied to clipboard
abstract fun getRuleSetFiles(): ConfigurableFileCollection
The custom rule set files to be used.
getRuleSets
Link copied to clipboard
abstract fun getRuleSets(): ListProperty<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.
getSourceSets
Link copied to clipboard
abstract fun getSourceSets(): ListProperty<SourceSet>
The source sets to be analyzed as part of the `check` and `build` tasks.
getThreads
Link copied to clipboard
abstract fun getThreads(): Property<Integer>
The number of threads used by PMD.
getToolVersion
Link copied to clipboard
abstract fun getToolVersion(): Property<String>
The version of the code quality tool to be used.
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.
setTargetJdk
Link copied to clipboard
open fun setTargetJdk(value: Any)
Sets the target jdk used with pmd.