SetupBuilder icon indicating copy to clipboard operation
SetupBuilder copied to clipboard

Support Gradle toolchains

Open mleegwt opened this issue 2 years ago • 1 comments

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.

mleegwt avatar Dec 01 '21 17:12 mleegwt

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.

Horcrux7 avatar Dec 03 '21 19:12 Horcrux7