Add PMD, for now with no rules
Unlike findbugs, PMD is very easy to configure. Should be very useful as long as we set a correct ruleSet.
This commit is contained in:
parent
580723fa64
commit
78d15dd4a8
@ -1,6 +1,7 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'witness'
|
apply plugin: 'witness'
|
||||||
apply plugin: 'checkstyle'
|
apply plugin: 'checkstyle'
|
||||||
|
apply plugin: 'pmd'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
@ -203,11 +204,24 @@ task checkstyle(type: Checkstyle) {
|
|||||||
configFile file("${project.rootDir}/config/checkstyle/checkstyle.xml")
|
configFile file("${project.rootDir}/config/checkstyle/checkstyle.xml")
|
||||||
source 'src', 'test/src'
|
source 'src', 'test/src'
|
||||||
include '**/*.java'
|
include '**/*.java'
|
||||||
exclude '**/gen/**'
|
|
||||||
|
|
||||||
classpath = files()
|
classpath = files()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pmd {
|
||||||
|
toolVersion = '5.4.1'
|
||||||
|
consoleOutput = true
|
||||||
|
}
|
||||||
|
|
||||||
|
task pmd(type: Pmd, dependsOn: assembleDebug) {
|
||||||
|
ruleSets = [
|
||||||
|
//'java-basic',
|
||||||
|
//'java-unusedcode',
|
||||||
|
]
|
||||||
|
source 'src'
|
||||||
|
include '**/org/fdroid/**/*.java'
|
||||||
|
}
|
||||||
|
|
||||||
// This person took the example code below from another blogpost online, however
|
// This person took the example code below from another blogpost online, however
|
||||||
// I lost the reference to it:
|
// I lost the reference to it:
|
||||||
// http://stackoverflow.com/questions/23297562/gradle-javadoc-and-android-documentation
|
// http://stackoverflow.com/questions/23297562/gradle-javadoc-and-android-documentation
|
||||||
|
Loading…
x
Reference in New Issue
Block a user