@@ -223,31 +223,31 @@ gemPush {
223
223
}
224
224
225
225
test {
226
- jvmArgs ' -XX:MaxPermSize=128M' , ' -Xmx2048m'
226
+ jvmArgs " -XX:MaxPermSize=128M" , " -Xmx2048m"
227
227
testLogging {
228
- outputs . upToDateWhen { false }
228
+ events " passed " , " skipped " , " failed " , " standardOut " , " standardError "
229
229
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat . FULL
230
230
showCauses = true
231
231
showExceptions = true
232
232
showStackTraces = true
233
233
showStandardStreams = true
234
- events " passed " , " skipped " , " failed " , " standardOut " , " standardError "
234
+ outputs . upToDateWhen { false }
235
235
}
236
236
}
237
237
238
- checkstyle {
239
- configFile = file(" ${ project.rootDir} /config/checkstyle/checkstyle.xml" )
240
- toolVersion = ' 6.14.1'
241
- }
242
- checkstyleMain {
243
- configFile = file(" ${ project.rootDir} /config/checkstyle/default.xml" )
244
- ignoreFailures = false
238
+ tasks. withType(Checkstyle ) {
239
+ reports {
240
+ // Not to skip up-to-date checkstyles.
241
+ outputs. upToDateWhen { false }
242
+ }
245
243
}
246
- checkstyleTest {
247
- configFile = file(" ${ project.rootDir} /config/checkstyle/default.xml" )
244
+
245
+ checkstyle {
246
+ toolVersion = libs. versions. checkstyle. get()
247
+ configFile = file(" ${ rootProject.projectDir} /config/checkstyle/checkstyle.xml" )
248
+ configProperties = [
249
+ " org.checkstyle.google.suppressionfilter.config" : file(" ${ rootProject.projectDir} /config/checkstyle/checkstyle-suppressions.xml" ),
250
+ ]
248
251
ignoreFailures = false
249
- }
250
- task checkstyle (type : Checkstyle ) {
251
- classpath = sourceSets. main. output + sourceSets. test. output
252
- source = sourceSets. main. allJava + sourceSets. test. allJava
252
+ maxWarnings = 0
253
253
}
0 commit comments