Add harness to allow smooth transition for 5.x #598
Merged
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.
We currently support all the way back to Gradle 2.x. As identified in #504, that will not be possible for much longer, so it's time for us to adopt all the latest and greatest. As part of that transition, it's a good opportunity to do some intentional breaking changes (e.g. remove deprecated APIs).
To enable us to make the 5.x jump without a long-lived feature branch, this PR extracts all non-deprecated behavior into
SpotlessTaskBase
andSpotlessExtensionBase
. It then introducesSpotlessTaskModern
,SpotlessExtensionModern
, andSpotlessPluginModern
(69f7d26). These are then implemented by copy-pasting the old legacy implementations in. This PR also introduces a new task:plugin-gradle:modernTest
, which runs all of theplugin-gradle
integration tests, but againstSpotlessPluginModern
rather than againstSpotlessPlugin
(b8282ae).If users want to use the new modern implementations in a real project, they can use
-PspotlessModern
. However, we don't commit to API stability on this until it is actually released.