Mark Alvaro
10/17/2023, 2:19 PMkotlin.version=1.6.10
agp.version=7.3.0
compose.version=1.1.0
compose.desktop {
application {
mainClass = "my.MainKt"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "my-app"
packageVersion = "1.0.0"
includeAllModules = true
}
}
}
plugins {
kotlin("multiplatform")
id("org.jetbrains.compose")
}
Michael Paus
10/17/2023, 2:56 PMMark Alvaro
10/17/2023, 3:05 PMKirill Grouchnikov
10/17/2023, 3:19 PMSebastian Kürten
10/17/2023, 3:46 PMjpackage
for packaging as that tool in turn does not support cross-compilation (it is a non goal for the tool as specified here: https://openjdk.org/jeps/343#Non-Goals)
I started a project that intends to go around that limitation by pulling the functionality of jpackage
into the packaging plugin. It still relies on JDK tooling, but uses jlink
instead which is able to package JVM runtimes for other operating systems and architectures. The tool is a new plugin called pinpit that can be used in conjunction with the compose plugin. I'm already using it in production, here's more info on it: https://github.com/mobanisto/pinpit-gradle-plugin and https://github.com/mobanisto/pinpit (second tool is for creating a working template project to get off the ground quickly with a new project).
Your alternatives are:
• Running your builds on various different machines with the architectures you want to package for
• Using github runners (although I think they do not support linux arm for example)
• using another 3rd party tool called Conveyor: https://conveyor.hydraulic.dev/11.4/Mark Alvaro
10/17/2023, 4:47 PM