Browse Source

Upgrade to Checkstyle 10.12.7

pull/31965/head
Juergen Hoeller 2 years ago
parent
commit
81bd6be1c0
  1. 8
      buildSrc/src/main/java/org/springframework/build/CheckstyleConventions.java

8
buildSrc/src/main/java/org/springframework/build/CheckstyleConventions.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2023 the original author or authors. * Copyright 2002-2024 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -50,12 +50,12 @@ public class CheckstyleConventions {
project.getPlugins().apply(CheckstylePlugin.class); project.getPlugins().apply(CheckstylePlugin.class);
project.getTasks().withType(Checkstyle.class).forEach(checkstyle -> checkstyle.getMaxHeapSize().set("1g")); project.getTasks().withType(Checkstyle.class).forEach(checkstyle -> checkstyle.getMaxHeapSize().set("1g"));
CheckstyleExtension checkstyle = project.getExtensions().getByType(CheckstyleExtension.class); CheckstyleExtension checkstyle = project.getExtensions().getByType(CheckstyleExtension.class);
checkstyle.setToolVersion("10.12.5"); checkstyle.setToolVersion("10.12.7");
checkstyle.getConfigDirectory().set(project.getRootProject().file("src/checkstyle")); checkstyle.getConfigDirectory().set(project.getRootProject().file("src/checkstyle"));
String version = SpringJavaFormatPlugin.class.getPackage().getImplementationVersion(); String version = SpringJavaFormatPlugin.class.getPackage().getImplementationVersion();
DependencySet checkstyleDependencies = project.getConfigurations().getByName("checkstyle").getDependencies(); DependencySet checkstyleDependencies = project.getConfigurations().getByName("checkstyle").getDependencies();
checkstyleDependencies checkstyleDependencies.add(
.add(project.getDependencies().create("io.spring.javaformat:spring-javaformat-checkstyle:" + version)); project.getDependencies().create("io.spring.javaformat:spring-javaformat-checkstyle:" + version));
}); });
} }

Loading…
Cancel
Save