SetupBuilder
SetupBuilder copied to clipboard
Support Gradle toolchains
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.
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
.