-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add auto JDK download #272
Conversation
hi @koppor ; so if a matching JDK can not be found one will be installed? That's perhaps somewhat unexpected, but could wrok. And this applies only to folks checking out |
Yeah, the Gradle tool chains feature tries to disconnect fully the client and tasks Java versions. The internals essentially are, if you can find a compatible Java runtime locally, then use it. Otherwise, if there are repository locations available download it to To your other question, yes, this would only effect contributors building and contributing to the Gradle plugin. It would not effect users that are utilizing the Gradle plugin in their builds. |
Thanks, that helps provide some context on what to expect. I noticed this plugin needs to go in Sorry for throwing up questions; the suggestion to add the plugin is appreciated, just want to make sure we consciously choose to adopt it, and if we do at the right level. |
Absolutely true. You can have create settings plugins in these binary jars by instead of using |
@shanman190 It's the first time I hear about "settings plugins". Can you elaborate? Do you have experience with "global configurations"? -- Context: At palantir-java-format, it is not possible to update gradle, because of "Adding a Configuration as a dependency is no longer allowed as of Gradle 8.0.". I was a bit in that code, but I could come up with a solution NOT requiring each plugin to contain a copy of the configuration. (The issue is palantir/palantir-java-format#977) |
So I see what the issue is over on that other GitHub issue and it's appears to be a quick and easy fix, so I'll file a PR here after a little bit. To elaborate on the settings plugin, it's just like a project plugin in effect, but the context is centered around providing configurations in the In the Gradle docs it is called out, but it's kinda a footnote.
https://docs.gradle.org/current/userguide/custom_plugins.html |
@shanman190 May I ask whether you could find time to support the other project (#272 (comment)). 😅🤩 |
After reading the comment openrewrite/rewrite#4018 (comment), the "feature" should be included somewhere else. Thus, closing to reduce the number of opened PRs. |
@koppor, I actually already submitted that PR and it was merged. :) |
@shanman190 OMG, I did not see. Thank you so much for bringing that project forward and clarifying the next steps! |
I have NixOS and no JDK17 installed. Therefore, I get
This can easily be solved with an auto JDK download:
https://github.com/gradle/foojay-toolchains#foojay-toolchains-plugin
I searched the issue list and did not find "foojay". Thus, I do not know if there is an ADR on that.
Hope, you like it!