diff --git a/F-Droid/build.gradle b/F-Droid/build.gradle index 7236d7c19..a58edd30d 100644 --- a/F-Droid/build.gradle +++ b/F-Droid/build.gradle @@ -1,6 +1,7 @@ apply plugin: 'com.android.application' apply plugin: 'witness' apply plugin: 'checkstyle' +apply plugin: 'pmd' repositories { jcenter() @@ -203,11 +204,24 @@ task checkstyle(type: Checkstyle) { configFile file("${project.rootDir}/config/checkstyle/checkstyle.xml") source 'src', 'test/src' include '**/*.java' - exclude '**/gen/**' 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 // I lost the reference to it: // http://stackoverflow.com/questions/23297562/gradle-javadoc-and-android-documentation