From 602d4189d11a3cd59d07f77b81721731f191534e Mon Sep 17 00:00:00 2001 From: Marcus Hert Da Coregio Date: Mon, 30 Oct 2023 12:10:24 -0300 Subject: [PATCH] Use lenient configuration for prohibited dependencies check Issue gh-14047 --- .../classpath/CheckClasspathForProhibitedDependencies.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/org/springframework/gradle/classpath/CheckClasspathForProhibitedDependencies.java b/buildSrc/src/main/java/org/springframework/gradle/classpath/CheckClasspathForProhibitedDependencies.java index 4738135e90..467aa34da8 100644 --- a/buildSrc/src/main/java/org/springframework/gradle/classpath/CheckClasspathForProhibitedDependencies.java +++ b/buildSrc/src/main/java/org/springframework/gradle/classpath/CheckClasspathForProhibitedDependencies.java @@ -55,7 +55,7 @@ public class CheckClasspathForProhibitedDependencies extends DefaultTask { @TaskAction public void checkForProhibitedDependencies() throws IOException { ResolvedConfiguration resolvedConfiguration = this.classpath.getResolvedConfiguration(); - TreeSet prohibited = resolvedConfiguration.getResolvedArtifacts().stream() + TreeSet prohibited = resolvedConfiguration.getLenientConfiguration().getArtifacts().stream() .map((artifact) -> artifact.getModuleVersion().getId()).filter(this::prohibited) .map((id) -> id.getGroup() + ":" + id.getName()).collect(Collectors.toCollection(TreeSet::new)); if (!prohibited.isEmpty()) {