Skip to content

Commit d9eae0d

Browse files
authored
Prevent tool configurations from being resolved outside project (#1447)
2 parents 11622e0 + 5e442db commit d9eae0d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

plugin-gradle/CHANGES.md

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `3.27.0`).
44

55
## [Unreleased]
6+
### Fixed
7+
* Prevent tool configurations from being resolved outside project ([#1447](https://github.com/diffplug/spotless/pull/1447) fixes [#1215](https://github.com/diffplug/spotless/issues/1215))
68

79
## [6.12.1] - 2023-01-02
810
### Fixed

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2022 DiffPlug
2+
* Copyright 2016-2023 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -118,6 +118,8 @@ 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);
122+
config.setVisible(false);
121123
config.attributes(attr -> {
122124
attr.attribute(Bundling.BUNDLING_ATTRIBUTE, project.getObjects().named(Bundling.class, Bundling.EXTERNAL));
123125
});

0 commit comments

Comments
 (0)