Package org.gradle.api.plugins.quality
Class PmdPlugin
java.lang.Object
org.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin<Pmd>
org.gradle.api.plugins.quality.PmdPlugin
- All Implemented Interfaces:
Plugin<org.gradle.api.internal.project.ProjectInternal>
public abstract class PmdPlugin
extends org.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin<Pmd>
A plugin for the PMD source code analyzer.
Declares a pmd
configuration which needs to be configured with the PMD library to be used.
Declares a pmdAux
configuration to add transitive compileOnly dependencies to the PMD's auxclasspath. This is only needed if PMD complains about NoClassDefFoundError during type
resolution.
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.
- See Also:
-
Field Summary
Fields inherited from class org.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin
project
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureConfiguration
(Configuration configuration) protected void
configureForSourceSet
(SourceSet sourceSet, Pmd task) protected void
configureTaskDefaults
(Pmd task, String baseName) protected void
protected CodeQualityExtension
getDefaultTargetJdk
(JavaVersion javaVersion) protected JavaToolchainService
protected String
Methods inherited from class org.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin
apply, beforeApply, conventionMappingOf, getBasePlugin, getConfigurationName, getJavaPluginExtension, getJvmPluginServices, getReportName, getRootProjectDirectory, getTaskBaseName, withBasePlugin
-
Field Details
-
DEFAULT_PMD_VERSION
- See Also:
-
-
Constructor Details
-
PmdPlugin
public PmdPlugin()
-
-
Method Details
-
getToolName
- Specified by:
getToolName
in classorg.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin<Pmd>
-
getTaskType
- Specified by:
getTaskType
in classorg.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin<Pmd>
-
getToolchainService
-
createExtension
- Specified by:
createExtension
in classorg.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin<Pmd>
-
getDefaultTargetJdk
-
createConfigurations
protected void createConfigurations()- Overrides:
createConfigurations
in classorg.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin<Pmd>
-
configureConfiguration
- Specified by:
configureConfiguration
in classorg.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin<Pmd>
-
configureTaskDefaults
- Overrides:
configureTaskDefaults
in classorg.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin<Pmd>
-
configureForSourceSet
- Overrides:
configureForSourceSet
in classorg.gradle.api.plugins.quality.internal.AbstractCodeQualityPlugin<Pmd>
-