Skip to content

Commit 94bc197

Browse files
committed
Polish "Add Spring Checkstyle with all checks disabled"
Commit aea0fea Issue gh-8945
1 parent 4e2a050 commit 94bc197

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

build.gradle

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,26 @@ subprojects {
4141
}
4242

4343
allprojects {
44-
apply plugin: 'io.spring.javaformat'
45-
apply plugin: 'checkstyle'
44+
if (!['spring-security-bom', 'spring-security-docs'].contains(project.name)) {
45+
apply plugin: 'io.spring.javaformat'
46+
apply plugin: 'checkstyle'
4647

47-
pluginManager.withPlugin("io.spring.convention.checkstyle", { plugin ->
48-
configure(plugin) {
49-
dependencies {
50-
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:$springJavaformatVersion"
48+
pluginManager.withPlugin("io.spring.convention.checkstyle", { plugin ->
49+
configure(plugin) {
50+
dependencies {
51+
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:$springJavaformatVersion"
52+
}
53+
checkstyle {
54+
toolVersion = '8.34'
55+
}
5156
}
52-
checkstyle {
53-
toolVersion = '8.34'
54-
}
55-
}
56-
})
57+
})
5758

58-
if (project.name.contains('sample')) {
59-
tasks.whenTaskAdded { task ->
60-
if (task.name.contains('format') || task.name.contains('checkFormat') || task.name.contains("checkstyle")) {
61-
task.enabled = false
59+
if (project.name.contains('sample')) {
60+
tasks.whenTaskAdded { task ->
61+
if (task.name.contains('format') || task.name.contains('checkFormat') || task.name.contains("checkstyle")) {
62+
task.enabled = false
63+
}
6264
}
6365
}
6466
}

0 commit comments

Comments
 (0)