This message was deleted.
# community-support
s
This message was deleted.
s
Aside from "one is an enum, and one is an interface" I mean 😉
v
JavaVersion
is much older and has nothing to do with toolchains
You can for example use
JavaVersion.current()
to do something depending on the Java version with which Gradle is executed
JavaLanguageVersion
is for the toolchain support to define a Java language version to use for something
Of course you can do something like
_languageVersion_.set(JavaLanguageVersion.of(JavaVersion._VERSION_17_._majorVersion_))
to combine both
But I personally do store the Java version to be used together with the other versions in the version catalog now
_languageVersion_.set(JavaLanguageVersion.of(_libs_._versions_._java_.get()))
s
I just meant conceptually, sorry. So they are conceptually the same; just different that `JavaLanguageVersion`is specifically intended for toolchains
v
Conceptually they are both about a Java version, yes
s
That's interesting about version catalog, had not considered that 🙂
Thanks as always!
👌 1