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

Toolchainsupport (default and / or documentation) #907

Closed
Vampire opened this issue Jun 23, 2023 · 5 comments
Closed

Toolchainsupport (default and / or documentation) #907

Vampire opened this issue Jun 23, 2023 · 5 comments

Comments

@Vampire
Copy link

Vampire commented Jun 23, 2023

This is either a change request and / or a documentation request, as well as a clarification question. :-)

I've seen that the plugin added toolchain support, but only as an opt-in feature.
I wonder why it is opt-in and not enabled by default like in other plugins / tasks like the built-in ones or the Kotlin plugin.

Is there a valid reason to not use the toolchain support and thus get better reproducible builds by not depending on the Gradle runtime Java version?

Also the setting to opt-in is documented nowhere except in source and release notes.
It is neither on the web docs, nor in the readme.
As well as the option for configuring the Java launcher.

So the option(s) should be documented and maybe the opt-in even removed and just used by default.
If one does want for whatever reason the Gradle runtime version being used, he can always configure it like that using

launcher = javaToolchains.launcherFor {
    languageVersion = JavaLanguageVersion.of(JavaVersion.current().majorVersion)
}
@Vampire
Copy link
Author

Vampire commented Jun 23, 2023

Besides that the option is confusing and non-intuitive anyway.
If you set a launcher on the task, but set useJavaToolchains to false, I would expect the launcher to not be used as I disabled toolchains usage. The opt-in flag should probably have been called useDefaultJavaToolchain or something similar. :-D

@KengoTODA
Copy link
Member

It is probably possible to handle as a part of v6 release, I'll check.

@github-actions
Copy link

🎉 This issue has been resolved in version 6.0.0-beta.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This issue has been resolved in version 6.0.0-rc.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

github-actions bot commented Dec 2, 2023

🎉 This issue has been resolved in version 6.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants