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

Support Gradle toolchains #109

Open
mleegwt opened this issue Dec 1, 2021 · 1 comment
Open

Support Gradle toolchains #109

mleegwt opened this issue Dec 1, 2021 · 1 comment

Comments

@mleegwt
Copy link

mleegwt commented Dec 1, 2021

Since Gradle 7 toolchains are supported by Gradle. See https://docs.gradle.org/current/userguide/toolchains.html
It would be awesome to support them that way instead of the 'magic' lookup that is currently implemented.

@Horcrux7
Copy link
Member

Horcrux7 commented Dec 3, 2021

Why you can't use it? I am not familiar with this new API. But I think the follow snipped should work:

setupBuilder {
    def javaLauncher = javaToolchains.launcherFor {
        languageVersion = JavaLanguageVersion.of(14)
    }
    bundleJre = javaLauncher.metadata.installationPath
}

If this not work you can try javaLauncher.metadata.installationPath.asFile.absolutePath.

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

No branches or pull requests

2 participants