This message was deleted.
# android
s
This message was deleted.
t
Fwiw, I do put the version of the Java toolchain (and versions of tools used by plugins, e.g. google-java-format and ktlint, used throughspotless) in my version catalog.
👍 1
I have this kind of code in my convention plugin:
Copy code
java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(project.the<VersionCatalogsExtension>().named("libs").findVersion("javaToolchain").orElseThrow().requiredVersion))
    }
}
e
Ok, what actually bother me is the
.toInt()
but 🤷
t
Well,
JavaLanguageVersion.of()
is not much different from
.toInt()
as some parsing is involved anyway, and I need a string, not any "rich version" (see
.requiredVersion
, it would ignore any other property of rich versions here). (I do believe I've used
.toInt()
in the past, or maybe just in another project, to set
.release
, rather than using a toolchain)