Skip to content

Commit 338dd16

Browse files
authored
Prevent tool configurations from being resolved outside project
When exposed they can create ambiguities when downstream projects try to automatically choose a configuration based on its attributes.
1 parent 11622e0 commit 338dd16

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ private static Provisioner forConfigurationContainer(Project project, Configurat
118118
.forEach(config.getDependencies()::add);
119119
config.setDescription(mavenCoords.toString());
120120
config.setTransitive(withTransitives);
121+
config.setCanBeConsumed(false);
121122
config.attributes(attr -> {
122123
attr.attribute(Bundling.BUNDLING_ATTRIBUTE, project.getObjects().named(Bundling.class, Bundling.EXTERNAL));
123124
});

0 commit comments

Comments
 (0)