Polish "Add Spring Checkstyle with all checks disabled"

Commit aea0fea5d9

Issue gh-8945
This commit is contained in:
Joe Grandja 2020-09-09 11:16:07 -04:00
parent 4e2a050c14
commit 94bc19747d
1 changed files with 17 additions and 15 deletions

View File

@ -41,24 +41,26 @@ subprojects {
}
allprojects {
apply plugin: 'io.spring.javaformat'
apply plugin: 'checkstyle'
if (!['spring-security-bom', 'spring-security-docs'].contains(project.name)) {
apply plugin: 'io.spring.javaformat'
apply plugin: 'checkstyle'
pluginManager.withPlugin("io.spring.convention.checkstyle", { plugin ->
configure(plugin) {
dependencies {
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:$springJavaformatVersion"
pluginManager.withPlugin("io.spring.convention.checkstyle", { plugin ->
configure(plugin) {
dependencies {
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:$springJavaformatVersion"
}
checkstyle {
toolVersion = '8.34'
}
}
checkstyle {
toolVersion = '8.34'
}
}
})
})
if (project.name.contains('sample')) {
tasks.whenTaskAdded { task ->
if (task.name.contains('format') || task.name.contains('checkFormat') || task.name.contains("checkstyle")) {
task.enabled = false
if (project.name.contains('sample')) {
tasks.whenTaskAdded { task ->
if (task.name.contains('format') || task.name.contains('checkFormat') || task.name.contains("checkstyle")) {
task.enabled = false
}
}
}
}