Skip to content

Instantly share code, notes, and snippets.

@dpreussler
Created January 2, 2017 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dpreussler/e47af6e3d6fb4dbdf1619cb153b7c521 to your computer and use it in GitHub Desktop.
Save dpreussler/e47af6e3d6fb4dbdf1619cb153b7c521 to your computer and use it in GitHub Desktop.
apply plugin: 'checkstyle'
apply plugin: 'pmd'
task checkstyle(type: ParallelCheckstyle) {
configFile file("${project.rootDir}/config/checkstyle/checkstyle.xml")
source 'src/main/java'
include '**/*.java'
classpath = files()
}
task pmd (type: ParallelPmd) {
description 'Run pmd'
group 'verification'
ignoreFailures true
ruleSetFiles = files("${project.rootDir}/config/pmd/custom-pmd-ruleset.xml")
// ruleSets = ["java-basic", "java-strings", "java-design", "java-unusedcode"]
source = fileTree('src/main/java')
reports {
xml.enabled = true
html.enabled = true
}
}
@ParallelizableTask
class ParallelCheckstyle extends Checkstyle {
}
@ParallelizableTask
class ParallelPmd extends Pmd {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment