Files
allwpilib/shared/java/javastyle.gradle

25 lines
658 B
Groovy
Raw Normal View History

if (!project.hasProperty('skipJavaFormat')) {
apply plugin: 'checkstyle'
2018-06-03 10:00:53 -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
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
}
task javaFormat {
dependsOn(tasks.withType(Checkstyle))
dependsOn(tasks.withType(Pmd))
}