Plugin<org.gradle.api.internal.project.ProjectInternal>
public class PmdPlugin extends org.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin<Pmd>
Declares a pmd configuration which needs to be configured with the PMD library to be used.
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.
PmdExtension
,
Pmd
Modifier and Type | Field | Description |
---|---|---|
static String |
DEFAULT_PMD_VERSION |
Constructor | Description |
---|---|
PmdPlugin() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
configureConfiguration(Configuration configuration) |
|
protected void |
configureForSourceSet(SourceSet sourceSet,
Pmd task) |
|
protected void |
configureTaskDefaults(Pmd task,
String baseName) |
|
protected CodeQualityExtension |
createExtension() |
|
TargetJdk |
getDefaultTargetJdk(JavaVersion javaVersion) |
|
protected Class<Pmd> |
getTaskType() |
|
protected String |
getToolName() |
public static final String DEFAULT_PMD_VERSION
protected String getToolName()
getToolName
in class org.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin<Pmd>
protected Class<Pmd> getTaskType()
getTaskType
in class org.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin<Pmd>
protected CodeQualityExtension createExtension()
createExtension
in class org.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin<Pmd>
public TargetJdk getDefaultTargetJdk(JavaVersion javaVersion)
protected void configureConfiguration(Configuration configuration)
configureConfiguration
in class org.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin<Pmd>
protected void configureTaskDefaults(Pmd task, String baseName)
configureTaskDefaults
in class org.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin<Pmd>