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.