<https://kotlinlang.slack.com/archives/C05T8U2C31T...
# compose-desktop
p
https://kotlinlang.slack.com/archives/C05T8U2C31T/p1717590238699539 I'm having issues defining what runtime to embed when deploying a desktop app. Anyone got experience with this? Seb mentioned @dcampogiani πŸ™
βœ… 1
d
I am not sure I am the Daniele C mentioned by @seb πŸ€”
s
Nope
p
Oops, sorry πŸ™ˆ
d
πŸ˜„
s
I meant ex Novoda Daniele πŸ€ͺ
p
So many Danieles πŸ˜…
Aaaah!
s
He's not here, would've tagged him otherwise
p
That makes sense. Thanks πŸ™
d
I'm everywhere and I know nothing instead.
πŸ˜„ 2
r
I have experienced this but only attempted to solve it for macOS. You can check my Gradle file: https://github.com/romainguy/kotlin-explorer/blob/main/build.gradle.kts
p
Was it
modules("jdk.unsupported")
what fixed it?
r
Depends on the issue you are running into but this was needed by JNA which is used by Jewel. Crafting the right proguard rules was also a pain
p
Oof, I gave up momentarily on proguard (for now) after trying it πŸ˜…
r
Copy my config :)
πŸ™ 1
p
I'm struggling to package the app with JBR embeded
The app works when running it, as long as I change the JDK on the IDE to use JBR, but the moment I try to package the distribution app, it picks up the local runtime instead of Jetbrains' one
r
That Gradle file above works for me
I also had to specifically add Skiko dependencies for packaging to work
πŸ‘€ 1
p
I tried packaging your project and I got the same error. What command do you use to package it?
I'm using
./gradlew packageDistributionForCurrentOS
r
I use
packageReleaseDmg
p
After removing all the JDks on my machine and installing only corretto.17 I'm still getting the same error 😭 (on kotlin-explorer)
I've tried using jbr-sdk, but I get this error instead:
Copy code
Error: --module-path is not specified and this runtime image does not contain jmods directory.
Usage: jlink <options> --module-path <modulepath> --add-modules <module>[,<module>...]
Use --help for a list of possible options
r
I use the jbrsdk in the project, but it’s not my default Java SDK on my machine (Zulu 18)
Here’s how the project is setup:
p
but that shouldn't affect when running from command line, I imagine πŸ€”
This is what I have. I'm still having the same issue regarding the missing JBR. πŸ™ˆ
r
Change the Gradle JVM to jbrsdk
p
I've tried that and I get this error from jlink:
Copy code
Error: --module-path is not specified and this runtime image does not contain jmods directory.
Usage: jlink <options> --module-path <modulepath> --add-modules <module>[,<module>...]
Use --help for a list of possible options
let me try with 17.0.9 instead of 17.0.11 🀞
OMFG, that was it.
r
Ugh
p
And it works on my project. Thank you so much for the help πŸ™
πŸŽ‰ 1