Skip to content

Commit 4c04cd4

Browse files
fp7wilkinsona
authored andcommitted
Don't calculate exclusions for non transitive configurations
All direct dependencies of a configuration are included by default and all other are excluded by default for non transitive configurations. It is therefore unnecessary to calculate exclusions. See gh-372
1 parent e722715 commit 4c04cd4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/io/spring/gradle/dependencymanagement/internal/ExclusionConfiguringAction.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ private void applyMavenExclusions(ResolvableDependencies resolvableDependencies)
9696
}
9797

9898
private Set<DependencyCandidate> findExcludedDependencies() {
99+
if (!this.configuration.isTransitive()) {
100+
return Collections.emptySet();
101+
}
99102
ResolutionResult resolutionResult = copyConfiguration().getIncoming().getResolutionResult();
100103
ResolvedComponentResult root = resolutionResult.getRoot();
101104
Set<DependencyCandidate> excludedDependencies = new HashSet<>();

0 commit comments

Comments
 (0)