Remove Java formatting from build task in CI (#3507)

This saves time in CI spent performing the same source-level checks in
every build job. Checkstyle, PMD, and Spotless are now run once in the
"Lint and Format" job.

The -PskipPMD flag was replaced with a -PskipJavaFormat flag that
disables Checkstyle, PMD, and Spotless.
This commit is contained in:
Tyler Veness
2021-08-07 20:39:14 -07:00
committed by GitHub
parent 09666ff294
commit 252b8c83bf
6 changed files with 35 additions and 13 deletions

View File

@@ -1,13 +1,12 @@
if (!project.hasProperty('skipJavaFormat')) {
apply plugin: 'checkstyle'
apply plugin: 'checkstyle'
checkstyle {
toolVersion = "8.38"
configDirectory = file("${project.rootDir}/styleguide")
config = resources.text.fromFile(new File(configDirectory.get().getAsFile(), "checkstyle.xml"))
}
checkstyle {
toolVersion = "8.38"
configDirectory = file("${project.rootDir}/styleguide")
config = resources.text.fromFile(new File(configDirectory.get().getAsFile(), "checkstyle.xml"))
}
if (!project.hasProperty('skipPMD')) {
apply plugin: 'pmd'
pmd {