Hey there! I’m trying to build a Compose Desktop J...
# compose-desktop
m
Hey there! I’m trying to build a Compose Desktop JAR that should run on both Mac + Linux. If I use
./gradlew packageDistributionForCurrentOS
on my Mac, of course the JAR will be having the mac native packages, so running the JAR on Linux will throw an exception (see screenshot). Or at least: how can I build a Linux-ARM64 uber JAR on my Mac? That would help me already!
a
You currently can’t cross-build Compose apps. You have to build on the same OS+arch that the app will run on.
m
ah, that’s a bummer!
Luckily for me, I managed to build the Linux JAR inside a Docker image. It’s not the best developer experience, but it works.
Thanks for the info!
a
Haha yeah this caught me out too although I’m learning to build for windows :)
Actually the other thing to be careful of is building a mac release version needs signing certificate setup however if you don’t do that the error message is somewhat cryptic and unhelpful
a
I’m building without signing and no problems.
s
Closest you can do is use https://github.com/fourlastor-alexandria/construo @Marc Reichelt
It's been tested with Jewel and Compose for Desktop by the author, although it's of course not officially supported
The author, Daniele, is here. At-fourlastor