Skip to content
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

Configure latest released wrapper in new Gradle project #6333

Merged

Conversation

neilcsmith-net
Copy link
Member

@neilcsmith-net neilcsmith-net commented Aug 12, 2023

So that we don't get a release candidate wrapper when running the new Gradle project wizard, configure it to use version latest.

This highlights an issue that the wrapper is actually created by the init task. The wrapper checkbox currently has no effect except for running the wrapper task again.

Second commit fixes a typo in the project problems dialog.

Not sure if this is a better fallback solution for NB19 or not?

@neilcsmith-net neilcsmith-net added do not merge Don't merge this PR, it is not ready or just demonstration purposes. Gradle [ci] enable "build tools" tests labels Aug 12, 2023
@neilcsmith-net neilcsmith-net added this to the NB19 milestone Aug 12, 2023
@lkishalmi
Copy link
Contributor

Well, this could work. Though it comes with an API (SPI) change which shall be documented with @since and in apichanges.xml. My original idea was to get the available versions from the GradleDistributionManager and check if the GA version is available, then pass that version to the wrapper.

Then I've realized, that we do not have an option at the moment to pass version to the wrapper without SPI change, which i wanted to avoid in this late of the release phase.

Copy link
Contributor

@lkishalmi lkishalmi left a comment

Choose a reason for hiding this comment

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

The SPI changes needs to be documented.

@neilcsmith-net
Copy link
Member Author

neilcsmith-net commented Aug 12, 2023

Thanks @lkishalmi Yes, I didn't see a way to fix this without adding any API. Which we'd ideally not do so late. But if we're not waiting on the final release of 8.3, it feels like we should try not to let that leak into user projects. This seemed the minimal way to achieve that?

I can't follow up, or look at what the test is complaining about, for a couple of days. Feel free to take and alter, or close if you prefer.

@lkishalmi
Copy link
Contributor

Well, I do not think it would be that big an issue if NB 19 would be delivered with 8.3-rc-1 tooling. We actually did that with NB 17 and Gradle 8.0-rc-1, for the same reason. The tooling API has to work on recent JVM-s,

@neilcsmith-net
Copy link
Member Author

Sure, I don't have an issue with shipping the rc1 of the tooling API. Just think we should try not to have that being the default version of Gradle written into new projects.

Incidentally, as far as I know, the version of the tooling API in NB18 seems to work fine on JDK20.

@neilcsmith-net
Copy link
Member Author

OK, the tests for the GradleMultiWizardIterator seem to not like this change, although I cannot replicate that result locally. Assuming that's not the most likely template people will use, let's leave that as it was for now.

Will update docs and squash.

…lease candidate.

Fix typo in Gradle project problems message.

Document the API changes.
Copy link
Contributor

@lkishalmi lkishalmi left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

There is one bummer with this solution. the latest version would be 8.2.1 till 8.3 is not out, so until then this solution would actually downgrade the Gradle version, which could be a problem as well.

It seems Gradle 8.3-rc-4 came out last week, so probably by the time NB19 comes out the final 8.3 will be out as well, so I approve this change.

@neilcsmith-net
Copy link
Member Author

neilcsmith-net commented Aug 14, 2023

Thanks @lkishalmi

Actually, 8.3-rc4 was released today. I assume they may beat us to release.

There is a workaround to the version downgrade to 8.2.1 - untick the initialize wrapper checkbox, and you'll be left with the 8.3-rc1 wrapper left over from the init task instead. Of course, if someone doesn't want a wrapper at all, they're still stuck! 😄

@lkishalmi
Copy link
Contributor

Probably it's time to remove that Wrapper button in NB20...

@neilcsmith-net neilcsmith-net removed the do not merge Don't merge this PR, it is not ready or just demonstration purposes. label Aug 14, 2023
@neilcsmith-net neilcsmith-net merged commit 69b6589 into apache:delivery Aug 14, 2023
34 checks passed
@neilcsmith-net neilcsmith-net deleted the gradle-wrapper-latest branch January 16, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gradle [ci] enable "build tools" tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants