Class AndroidPmdExtension
- java.lang.Object
- 
- io.freefair.gradle.plugins.android.quality.AndroidCodeQualityExtension
- 
- io.freefair.gradle.plugins.android.quality.SourceSetBasedCodeQualityExtension
- 
- io.freefair.gradle.plugins.android.quality.AndroidPmdExtension
 
 
 
- 
 public class AndroidPmdExtension extends SourceSetBasedCodeQualityExtension - See Also:
- PmdExtension
 
- 
- 
Constructor SummaryConstructors Constructor Description AndroidPmdExtension(Project project)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)Property<Boolean>getIncrementalAnalysis()Controls whether to use incremental analysis or not.Property<Integer>getMaxFailures()The maximum number of failures to allow before stopping the build.ProjectgetProject()intgetRulePriority()The rule priority threshold; violations for rules with a lower priority will not be reported.TextResourcegetRuleSetConfig()The custom rule set to be used (if any).FileCollectiongetRuleSetFiles()The custom rule set files to be used.List<String>getRuleSets()The built-in rule sets to be used.TargetJdkgetTargetJdk()The target jdk to use with pmd, 1.3, 1.4, 1.5, 1.6, 1.7 or jspinthashCode()booleanisConsoleOutput()Whether or not to write PMD results toSystem.out.voidruleSetFiles(Object... ruleSetFiles)Convenience method for adding rule set files.voidruleSets(String... ruleSets)Convenience method for adding rule sets.voidsetConsoleOutput(boolean consoleOutput)Whether or not to write PMD results toSystem.out.voidsetIncrementalAnalysis(Property<Boolean> incrementalAnalysis)voidsetMaxFailures(Property<Integer> maxFailures)voidsetRulePriority(int intValue)Sets the rule priority threshold.voidsetRuleSetConfig(TextResource ruleSetConfig)The custom rule set to be used (if any).voidsetRuleSetFiles(FileCollection ruleSetFiles)The custom rule set files to be used.voidsetRuleSets(List<String> ruleSets)The built-in rule sets to be used.voidsetTargetJdk(Object value)Sets the target jdk used with pmd.voidsetTargetJdk(TargetJdk targetJdk)Sets the target jdk used with pmd.- 
Methods inherited from class io.freefair.gradle.plugins.android.quality.SourceSetBasedCodeQualityExtensiongetSourceSets, setSourceSets, toString
 - 
Methods inherited from class io.freefair.gradle.plugins.android.quality.AndroidCodeQualityExtensiongetReportsDir, getToolVersion, isIgnoreFailures, setIgnoreFailures, setReportsDir, setToolVersion
 
- 
 
- 
- 
- 
Constructor Detail- 
AndroidPmdExtensionpublic AndroidPmdExtension(Project project) 
 
- 
 - 
Method Detail- 
getRuleSetspublic List<String> getRuleSets() The built-in rule sets to be used. See the official list of built-in rule sets.ruleSets = ["category/java/errorprone.xml", "category/java/bestpractices.xml"]
 - 
setRuleSetspublic void setRuleSets(List<String> ruleSets) The built-in rule sets to be used. See the official list of built-in rule sets.ruleSets = ["category/java/errorprone.xml", "category/java/bestpractices.xml"]
 - 
ruleSetspublic void ruleSets(String... ruleSets) Convenience method for adding rule sets.ruleSets "category/java/errorprone.xml", "category/java/bestpractices.xml"- Parameters:
- ruleSets- the rule sets to be added
 
 - 
getTargetJdkpublic TargetJdk getTargetJdk() The target jdk to use with pmd, 1.3, 1.4, 1.5, 1.6, 1.7 or jsp
 - 
setTargetJdkpublic void setTargetJdk(TargetJdk targetJdk) Sets the target jdk used with pmd.- Parameters:
- targetJdk- The target jdk
- Since:
- 4.0
 
 - 
setTargetJdkpublic void setTargetJdk(Object value) Sets the target jdk used with pmd.- Parameters:
- value- The value for the target jdk as defined by- TargetJdk.toVersion(Object)
 
 - 
getMaxFailures@Incubating public Property<Integer> getMaxFailures() The maximum number of failures to allow before stopping the build. IfignoreFailures is set, this is ignored and no limit is enforced.- Since:
- 6.4
 
 - 
getRulePrioritypublic int getRulePriority() The rule priority threshold; violations for rules with a lower priority will not be reported. Default value is 5, which means that all violations will be reported.This is equivalent to PMD's Ant task minimumPriority property. See the official documentation for the list of priorities. rulePriority = 3
 - 
setRulePrioritypublic void setRulePriority(int intValue) Sets the rule priority threshold.
 - 
getRuleSetConfig@Nullable public TextResource getRuleSetConfig() The custom rule set to be used (if any). ReplacesruleSetFiles, except that it does not currently support multiple rule sets.See the official documentation for how to author a rule set. ruleSetConfig = resources.text.fromFile("config/pmd/myRuleSet.xml")- Since:
- 2.2
 
 - 
setRuleSetConfigpublic void setRuleSetConfig(@Nullable TextResource ruleSetConfig) The custom rule set to be used (if any). ReplacesruleSetFiles, except that it does not currently support multiple rule sets.See the official documentation for how to author a rule set. ruleSetConfig = resources.text.fromFile("config/pmd/myRuleSet.xml")- Since:
- 2.2
 
 - 
getRuleSetFilespublic FileCollection getRuleSetFiles() The custom rule set files to be used. See the official documentation for how to author a rule set file. If you want to only use custom rule sets, you must clearruleSets.ruleSetFiles = files("config/pmd/myRuleSet.xml")
 - 
setRuleSetFilespublic void setRuleSetFiles(FileCollection ruleSetFiles) The custom rule set files to be used. See the official documentation for how to author a rule set file. This adds to the default rule sets defined bygetRuleSets().ruleSetFiles = files("config/pmd/myRuleSets.xml")
 - 
ruleSetFilespublic void ruleSetFiles(Object... ruleSetFiles) Convenience method for adding rule set files.ruleSetFiles "config/pmd/myRuleSet.xml"- Parameters:
- ruleSetFiles- the rule set files to be added
 
 - 
isConsoleOutputpublic boolean isConsoleOutput() Whether or not to write PMD results toSystem.out.
 - 
setConsoleOutputpublic void setConsoleOutput(boolean consoleOutput) Whether or not to write PMD results toSystem.out.
 - 
getIncrementalAnalysispublic Property<Boolean> getIncrementalAnalysis() Controls whether to use incremental analysis or not. This is only supported for PMD 6.0.0 or better. See for more details.- Since:
- 5.6
 
 - 
getProjectpublic Project getProject() 
 - 
equalspublic boolean equals(Object o) - Overrides:
- equalsin class- SourceSetBasedCodeQualityExtension
 
 - 
canEqualprotected boolean canEqual(Object other) - Overrides:
- canEqualin class- SourceSetBasedCodeQualityExtension
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- SourceSetBasedCodeQualityExtension
 
 
- 
 
-