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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task configuration avoidance (WIP) (#269) #277
Task configuration avoidance (WIP) (#269) #277
Changes from 10 commits
df01002
9271ed3
9d5e247
4866e50
375204e
ffabae0
6a04297
e18dec3
e6818c5
ef77b18
3a19f27
18b70f0
e12b93b
5e370e5
2d59c7f
ffb1ff4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would actually keep this as
withGradleVersion("2.14.1")
. That's how we make sure that our legacy support doesn't break.Then, I would make a new
GradleTaskConfigurationAvoidanceTest
, which uses gradle 4.9, and asserts that tasks are actually created lazily. I don't see a need to introduce the GradleTest plugin, but maybe @eriwen knows about value that I'm missing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nedtwigg @jbduncan Is there an easy way to run all the tests twice once with each version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There might be, but our gradle tests are already pretty darn slow. None of our steps rely on Gradle, so it's really just the
SpotlessExtension
logic that we need to test. We compile against4.9
, so there's no risk that we'll use API that doesn't exist in 4.9. But we might accidentally use API that was added after2.14
, and that's what we'll catch by always running against2.14
- problems with4.9
will be caught at compile-time.For gradle == 4.9, it's a good idea to test and make sure that the task avoidance is doing what we intend it to do. That will have the added bonus of being an integration test for the
4.9+
logic in general.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That all sounds good to me. I will revert this change and create
GradleTaskConfigurationAvoidanceTest
as requested. :)