Allow Java Format without Spotless - #1755
Open
FinlayRJW wants to merge 1 commit into
Open
Conversation
Generate changelog in
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before this PR
Applying the Java Format Gradle plugin without Spotless on the buildscript classpath fails on Gradle 9.
PalantirJavaFormatSpotlessPlugineagerly createsSpotlessInterop, so Gradle resolves itsFormatterStepdependency even when no Spotless plugin is applied.After this PR
SpotlessInteropis created only after both Java and Spotless are applied. Projects can use Java Format without putting Spotless on the buildscript classpath.==COMMIT_MSG==
==COMMIT_MSG==
Testing
A regression test verifies that
PalantirJavaFormatSpotlessPlugincan be applied when Spotless is absent. The existing Spotless compatibility matrix, Error Prone, formatting, and Checkstyle checks pass. Three affected Gradle 9.7 builds also configure successfully with the locally published fix.Possible downsides?
None known. Spotless integration is initialised at the same point that it is used: after a supported Spotless plugin is applied.
Are Docs needed?
No. This restores the existing optional integration behaviour.