blob: ecd551bb27fc1fb59d3f615ab3e03eebb2693753 [file] [log] [blame]
Brian Silverman8fce7482020-01-05 13:18:21 -08001
2apply plugin: 'checkstyle'
3
4checkstyle {
5 toolVersion = "8.12"
6 configDirectory = file("${project.rootDir}/styleguide")
7 config = resources.text.fromFile(new File(configDirectory.get().getAsFile(), "checkstyle.xml"))
8}
9
10if (!project.hasProperty('skipPMD')) {
11 apply plugin: 'pmd'
12
13 pmd {
14 toolVersion = '6.7.0'
15 consoleOutput = true
16 reportsDir = file("$project.buildDir/reports/pmd")
17 ruleSetFiles = files(new File(rootDir, "styleguide/pmd-ruleset.xml"))
18 ruleSets = []
19 }
20}
Austin Schuh1e69f942020-11-14 15:06:14 -080021
22task javaFormat {
23 dependsOn(tasks.withType(Checkstyle))
24 dependsOn(tasks.withType(Pmd))
25}