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

Add mechanism for different package managers to contribute their installed JVM toolchains #29508

Open
big-guy opened this issue Jun 11, 2024 · 2 comments
Labels
a:feature A new functionality in:toolchains Java Toolchains

Comments

@big-guy
Copy link
Member

big-guy commented Jun 11, 2024

Instead of embedding multiple implementations for each type of package manager (ASDF, SDKMAN!, etc) into Gradle itself, like repositories, users should be able to configure their build to look in different locations (or providers) for installed JVM toolchains.

As part of this, we would introduce a mechanism for users to configure this, deprecate the built-in mechanisms and eventually remove them.

@dkowis
Copy link

dkowis commented Jun 11, 2024

Good plan! Looking forward to being able to contribute something to do this :D

@kravemir
Copy link

Ideally, convention over configuration, something that gradle (wrapper) could automatically pick up from environment, without a need to modify anything in gradle files, i.e. not having to adjust gradle.properties to set org.gradle.java.installations.fromEnv=JDK8,JRE17.

Something like Linux's PATH environment variable would be nice to have - comma delimited paths. Maybe JAVA_HOMES, JAVA_PATH(S), GRADLE_JAVA_HOMES, GRADLE_JAVA_PATH(S) or else.

Regarding #29214 attempt for Nix. Per-directory setup can be achieved with tool like direnv with use nix, that would just set gradle's default env variable, and wrapper should work okay. For NixOS (#29214), the env var can be set globally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature A new functionality in:toolchains Java Toolchains
Projects
None yet
Development

No branches or pull requests

3 participants