Skip to content

Commit 90778f7

Browse files
committed
GradleProvisioner throws GradleException instead of just logger.error, this way Gradle reports the root cause.
1 parent 4230476 commit 90778f7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

plugin-gradle/src/main/java/com/diffplug/gradle/spotless/GradleProvisioner.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,10 @@ private static Provisioner forConfigurationContainer(Project project, Configurat
127127
if (!projName.isEmpty()) {
128128
projName = projName + "/";
129129
}
130-
logger.error(
131-
"You need to add a repository containing the '{}' artifact in '{}build.gradle'.\n" +
130+
throw new GradleException(String.format(
131+
"You need to add a repository containing the '%s' artifact in '%sbuild.gradle'.\n" +
132132
"E.g.: 'repositories { mavenCentral() }'",
133-
mavenCoords, projName,
134-
e);
135-
throw e;
133+
mavenCoords, projName), e);
136134
}
137135
};
138136
}

0 commit comments

Comments
 (0)