Skip to content

Commit 2cb182f

Browse files
authored
Upgrade spotless gradle plugin to 6.0.0 (#80560)
1 parent 45b4a86 commit 2cb182f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

build-conventions/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ dependencies {
6666
api 'gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0'
6767
api 'org.apache.rat:apache-rat:0.11'
6868
compileOnly "com.puppycrawl.tools:checkstyle:8.42"
69-
api('com.diffplug.spotless:spotless-plugin-gradle:5.17.1') {
69+
api('com.diffplug.spotless:spotless-plugin-gradle:6.0.0') {
7070
exclude module: "groovy-xml"
7171
}
7272
}

build-conventions/src/main/java/org/elasticsearch/gradle/internal/conventions/precommit/FormattingPrecommitPlugin.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ public void apply(Project project) {
5050
project.getPlugins().apply(PrecommitTaskPlugin.class);
5151
project.getPlugins().apply(SpotlessPlugin.class);
5252

53+
// Spotless resolves required dependencies from project repositories, so we need maven central
54+
project.getRepositories().mavenCentral();
55+
5356
project.getExtensions().getByType(SpotlessExtension.class).java(java -> {
5457
String importOrderPath = "build-conventions/elastic.importorder";
5558
String formatterConfigPath = "build-conventions/formatterConfig.xml";

0 commit comments

Comments
 (0)