Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -6,6 +6,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
### Added
- Add the ability to specify a wildcard version (`*`) for external formatter executables. ([#2757](https://github.com/diffplug/spotless/issues/2757))
### Fixed
- configuration cache for groovy. ([#2797](https://github.com/diffplug/spotless/pull/2797))
- [fix] `NPE` due to workingTreeIterator being null for git ignored files. #911 ([#2771](https://github.com/diffplug/spotless/issues/2771))
### Changes
* Bump default `ktlint` version to latest `1.7.1` -> `1.8.0`. ([2763](https://github.com/diffplug/spotless/pull/2763))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ protected void setupTask(SpotlessTask task) {
if (!getProject().getPlugins().hasPlugin(GroovyBasePlugin.class)) {
throw new GradleException(message);
}
final boolean excludeJavaValue = excludeJava;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be related, but needs to add a test for verifiing it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to confirm locally that it fixes the issue, but wasn't able to write a working test (it just passed even though it failed in project). If it is really needed I will try to make it work a bit later

target = getSources(getProject(),
message,
sourceSet -> sourceSet.getExtensions().getByType(GroovySourceDirectorySet.class),
file -> {
final String name = file.getName();
if (excludeJava) {
if (excludeJavaValue) {
return name.endsWith(".groovy");
} else {
return name.endsWith(".groovy") || name.endsWith(".java");
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ develocity {
termsOfUseUrl = "https://gradle.com/terms-of-service"
termsOfUseAgree = "yes"
publishing {
onlyIf { providers.environmentVariable('CI').present }
onlyIf { getenv('CI') != null }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is unrelated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it just causes a warning for configuration cache. Nothing breaks, but I think code looks cleaner and it doesn't cause a warning

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you paste the warning here?

}
}
}
Expand Down
Loading