What is the minimum `jvmTarget` for Compose for de...
# compose-desktop
x
What is the minimum
jvmTarget
for Compose for desktop?
n
11 i think but i cannot remember where i read that
the screenshots also show jvmTarget 11
a
Also please note: "and to use the native distribution packaging JDK 15 or later must be used"
☝️ 1
👍 1
c
Yeah, I remember using jdk 11 because that's what I use for android and then someone here told me I needed 14 for something, and then eventually someone told me 15 in order to distribute. distribution is ultimately the endgame and so I will move to that at some point but right now I'm using jdk 14.
j
Yeah, I think the jpackage was still extremely buggy in JDK 14, so I'd pretty strongly recommend JDK 15.
But it is possible to make your class files compatible with JDK 11 and then use a jpackage from JDK 15 to distribute a JDK 11 JVM. That would be a pretty damn niche use case though. More commonly, JDK 11 is used for situations (like creating Intellij/Idea plugins) where you are not intending to package it as a standalone app.
n
i guess targeting
1.8
will stay a pipedream ?
j
Mmm, not necessarily. I don't think there is any fundamental reason that JDK 11 is the minimum, and there is at least one bug requesting JDK 8: https://github.com/JetBrains/skiko/issues/71 Skiko is a dependency of Compose, and skiko is being built for JDK 11, which is why the bug is there. Anyway, I don't think it's impossible. I think it's mostly a combination of lack-of-demand and other priorities. I don't want to speak on behalf of Jetbrains, but I kinda suspect they'd be willing to take a PR that fixes this. Contributions are generally welcomed.
x
Thanks all - can confirm that jdk 15 is minimum if you wish to package, but this only needs to be set in the
:desktop
module where the desktop app is built. Any Multiplatform modules that it depends on still can target
jdkTarget
minimum of 11