Is there any documentation for properly setting up...
# compose-desktop
c
Is there any documentation for properly setting up JPMS with Compose for Desktop apps? My project runs fine with
run
task, but I get `NoClassDefFoundError`s when running with
runDistributable
that I believe are because of how jlink/jpackage is packaging it with some of my Java dependencies. I’ve never done anything with JPMS, so it would be nice to have a guide for getting that configured properly with the Gradle plugin,
module-info.java
, and anything else that’s needed
j
I assume you've seen this bug: https://github.com/JetBrains/compose-jb/issues/463 - any suggestions/feedback you have on how we could do better would be appreciated.
c
I hadn’t seen that issue yet, but it seems to have worked, thanks! I’ve always been confused about how to actually go about setting up a project to use JPMS. I was going deep down a rabbit-hole trying to figure out if I needed to include my own module-info file, how to set that up with the Kotlin/Compose Gradle plugins, etc. before I landed on a couple similar issues. I think a brief explanation of how the modules are being used in this document would help: https://github.com/JetBrains/compose-jb/tree/master/tutorials/Native_distributions_and_local_execution . For example, in the “Basic usage” section, include the
modules(...)
call in the code snippet and explain what needs to go there and how to find the modules you need to add (maybe linking to that issue?)
j
👍 That sounds like a good idea. Would you be open to submitting a pull request that updates the doc?
c
Sure thing! I’ll get that up today