This message was deleted.
# community-support
s
This message was deleted.
v
If you need to use a plugin that requires Java 17, you cannot use toolchains for that, you have to actually run Gradle with Java 17.
p
Thanks. This also affects project plugins, doesn't it?
v
Yes, I said "a plugin". 🙂
t
This is different: this is for compiling the plugins, not for consuming them (and the release notes quite clearly say it).
☝️ 1
s
I always add something like this to make it fail with a clear message when I run into this situation.
buildscript {
if (!JavaVersion.current().java17Compatible) {
throw new GradleException("Gradle must be launched with Java 17 or greater. Set JAVA_HOME.")
}
}
👌 1