Reporting<PmdReports>, PatternFilterable, VerificationTask@CacheableTask public class Pmd extends SourceTask implements VerificationTask, Reporting<PmdReports>
PmdPlugin,
PmdExtensionTask.NamersourceTASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE| Constructor | Description |
|---|---|
Pmd() |
| Modifier and Type | Method | Description |
|---|---|---|
org.gradle.api.internal.project.IsolatedAntBuilder |
getAntBuilder() |
|
FileCollection |
getClasspath() |
Compile class path for the classes to be analyzed.
|
boolean |
getIgnoreFailures() |
Whether or not to allow the build to continue if there are warnings.
|
ObjectFactory |
getObjectFactory() |
Injects and returns an instance of
ObjectFactory. |
FileCollection |
getPmdClasspath() |
The class path containing the PMD library to be used.
|
PmdReports |
getReports() |
The reports to be generated by this task.
|
int |
getRulePriority() |
Specifies the rule priority threshold.
|
TextResource |
getRuleSetConfig() |
The custom rule set to be used (if any).
|
FileCollection |
getRuleSetFiles() |
The custom rule set files to be used.
|
java.util.List<java.lang.String> |
getRuleSets() |
The built-in rule sets to be used.
|
FileTree |
getSource() |
Returns the source for this task, after the include and exclude patterns have been applied.
|
TargetJdk |
getTargetJdk() |
The target JDK to use with PMD.
|
boolean |
isConsoleOutput() |
Whether or not to write PMD results to
System.out. |
PmdReports |
reports(groovy.lang.Closure closure) |
Configures the reports to be generated by this task.
|
PmdReports |
reports(Action<? super PmdReports> configureAction) |
Configures the reports to be generated by this task.
|
void |
run() |
|
void |
setClasspath(FileCollection classpath) |
Compile class path for the classes to be analyzed.
|
void |
setConsoleOutput(boolean consoleOutput) |
Whether or not to write PMD results to
System.out. |
void |
setIgnoreFailures(boolean ignoreFailures) |
Whether or not to allow the build to continue if there are warnings.
|
void |
setPmdClasspath(FileCollection pmdClasspath) |
The class path containing the PMD library to be used.
|
void |
setRulePriority(int intValue) |
Sets the rule priority threshold.
|
void |
setRuleSetConfig(TextResource ruleSetConfig) |
The custom rule set to be used (if any).
|
void |
setRuleSetFiles(FileCollection ruleSetFiles) |
The custom rule set files to be used.
|
void |
setRuleSets(java.util.List<java.lang.String> ruleSets) |
The built-in rule sets to be used.
|
void |
setTargetJdk(TargetJdk targetJdk) |
The target JDK to use with PMD.
|
boolean |
stdOutIsAttachedToTerminal() |
|
static void |
validate(int value) |
Validates the value is a valid PMD RulePriority (1-5)
|
addValidator, appendParallelSafeAction, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doFirst, doLast, doLast, doLast, execute, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTaskIdentity, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, leftShift, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, replaceLogger, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toStringconventionMapping, conventionMapping, getConventionMappingnewInputDirectory, newInputFile, newOutputDirectory, newOutputFileclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitexclude, exclude, exclude, exclude, getExcludes, getIncludes, getPatternSetFactory, include, include, include, include, setExcludes, setIncludes, setSource, setSource, source@Incubating @Inject public ObjectFactory getObjectFactory()
ObjectFactory.@Inject public org.gradle.api.internal.project.IsolatedAntBuilder getAntBuilder()
public void run()
public boolean stdOutIsAttachedToTerminal()
public PmdReports reports(@DelegatesTo(value=PmdReports.class,strategy=1) groovy.lang.Closure closure)
reports in interface Reporting<PmdReports>closure - The configurationpublic PmdReports reports(Action<? super PmdReports> configureAction)
reports in interface Reporting<PmdReports>configureAction - The configurationpublic static void validate(int value)
value - rule priority threshold@PathSensitive(RELATIVE) public FileTree getSource()
getSource in class SourceTask@Classpath public FileCollection getPmdClasspath()
public void setPmdClasspath(FileCollection pmdClasspath)
@Input public java.util.List<java.lang.String> getRuleSets()
public void setRuleSets(java.util.List<java.lang.String> ruleSets)
public void setTargetJdk(TargetJdk targetJdk)
@Incubating @Nullable @Optional public TextResource getRuleSetConfig()
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(resources.file("config/pmd/myRuleSets.xml"))@Incubating public void setRuleSetConfig(@Nullable TextResource ruleSetConfig)
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(resources.file("config/pmd/myRuleSets.xml"))@InputFiles @PathSensitive(NONE) public FileCollection getRuleSetFiles()
public void setRuleSetFiles(FileCollection ruleSetFiles)
public final PmdReports getReports()
getReports in interface Reporting<PmdReports>public boolean getIgnoreFailures()
getIgnoreFailures in interface VerificationTaskpublic void setIgnoreFailures(boolean ignoreFailures)
setIgnoreFailures in interface VerificationTaskignoreFailures - false to break the build on failure, true to ignore the failures. The default is false.@Input @Incubating public int getRulePriority()
PmdExtension.rulePriority@Incubating public void setRulePriority(int intValue)
@Input @Incubating public boolean isConsoleOutput()
System.out.@Incubating public void setConsoleOutput(boolean consoleOutput)
System.out.@Incubating @Nullable @Optional @Classpath public FileCollection getClasspath()
@Incubating public void setClasspath(@Nullable FileCollection classpath)