2021-08-07 20:39:14 -07:00
|
|
|
if (!project.hasProperty('skipJavaFormat')) {
|
|
|
|
|
apply plugin: 'checkstyle'
|
2018-06-03 10:00:53 -07:00
|
|
|
|
2021-08-07 20:39:14 -07:00
|
|
|
checkstyle {
|
|
|
|
|
toolVersion = "8.38"
|
|
|
|
|
configDirectory = file("${project.rootDir}/styleguide")
|
|
|
|
|
config = resources.text.fromFile(new File(configDirectory.get().getAsFile(), "checkstyle.xml"))
|
|
|
|
|
}
|
2018-06-03 10:00:53 -07:00
|
|
|
|
2019-06-28 14:09:10 -07:00
|
|
|
apply plugin: 'pmd'
|
|
|
|
|
|
|
|
|
|
pmd {
|
|
|
|
|
toolVersion = '6.7.0'
|
|
|
|
|
consoleOutput = true
|
|
|
|
|
reportsDir = file("$project.buildDir/reports/pmd")
|
|
|
|
|
ruleSetFiles = files(new File(rootDir, "styleguide/pmd-ruleset.xml"))
|
|
|
|
|
ruleSets = []
|
|
|
|
|
}
|
2018-06-03 10:00:53 -07:00
|
|
|
}
|
2020-10-24 23:18:19 -04:00
|
|
|
|
|
|
|
|
task javaFormat {
|
|
|
|
|
dependsOn(tasks.withType(Checkstyle))
|
|
|
|
|
dependsOn(tasks.withType(Pmd))
|
|
|
|
|
}
|