Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions plugin-gradle/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
### Fixed
- `versionCatalog()` preserves entries when comments contain unmatched brackets, preserves commas inside quoted strings, and keeps significant line boundaries in multiline entries. ([#3042](https://github.com/diffplug/spotless/pull/3042))
- `versionCatalog()` now reports unfinished entries as lints at their starting line. These fail formatting by default, so upgrading may expose catalog errors that previously caused silent data loss. ([#3042](https://github.com/diffplug/spotless/pull/3042))
- Stop calling deprecated `Configuration.setVisible` from Gradle 9.1.0 ([#3053](https://github.com/diffplug/spotless/pull/3053))

## [8.10.2] - 2026-09-04
### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.gradle.api.attributes.Category;
import org.gradle.api.attributes.java.TargetJvmEnvironment;
import org.gradle.api.initialization.dsl.ScriptHandler;
import org.gradle.util.GradleVersion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -53,16 +54,16 @@ enum Policy {

public DedupingProvisioner dedupingProvisioner(Project project) {
return switch (this) {
case ROOT_PROJECT -> new DedupingProvisioner(forProject(project));
case ROOT_BUILDSCRIPT -> new DedupingProvisioner(forRootProjectBuildscript(project));
default -> throw Unhandled.enumException(this);
case ROOT_PROJECT -> new DedupingProvisioner(forProject(project));
case ROOT_BUILDSCRIPT -> new DedupingProvisioner(forRootProjectBuildscript(project));
default -> throw Unhandled.enumException(this);
};
}

public DedupingP2Provisioner dedupingP2Provisioner(Project project) {
return switch (this) {
case ROOT_PROJECT, ROOT_BUILDSCRIPT -> new DedupingP2Provisioner(P2Provisioner.createDefault(), defaultP2CacheDirectory(project));
default -> throw Unhandled.enumException(this);
case ROOT_PROJECT, ROOT_BUILDSCRIPT -> new DedupingP2Provisioner(P2Provisioner.createDefault(), defaultP2CacheDirectory(project));
default -> throw Unhandled.enumException(this);
};
}
}
Expand Down Expand Up @@ -133,7 +134,10 @@ private static Provisioner forConfigurationContainer(Project project, Configurat
config.setDescription("Spotless internal dependency resolution for " + request);
config.setTransitive(withTransitives);
config.setCanBeConsumed(false);
config.setVisible(false);
if (GradleVersion.current().compareTo(GradleVersion.version("9.1.0")) < 0) {
// Deprecated from 9.1.0
config.setVisible(false);
}
config.attributes(attr -> {
attr.attribute(Category.CATEGORY_ATTRIBUTE, project.getObjects().named(Category.class, Category.LIBRARY));
attr.attribute(Bundling.BUNDLING_ATTRIBUTE, project.getObjects().named(Bundling.class, Bundling.EXTERNAL));
Expand Down
Loading