how to create native distributions (installers/packages) for all the supported systems with compose?

33 Views Asked by At

I created a desktop application project with Compose.

Now I ask how do I port this project to an exe application to share it?

I searched in several sources and did not find anything. I asked some and did not receive a response from them.

1

There are 1 best solutions below

0
Haggy On

In case you added the TargetFormat.Msi to the following block you should have a gradle tasks like packageMsi or packagaReleaseMsi. Further questions might be answered by this Readme.

compose.desktop {
    application {
        mainClass = "your.package.MainKt"
        javaHome = System.getenv("JAVA_HOME")

        nativeDistributions {
            targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
            packageName = "AppName"
            packageVersion = "1.0.0"
        }
    }
}