Hi all, I have an issue when I make package for d...
# compose-desktop
v
Hi all, I have an issue when I make package for desktop app (behavior is the same for mac and windows11). Application runs normally from IDE or if I use gradlew.bat run on any machine. But if I install the packed (deb or msi) It will just try to start? happens in a sec, small loading spinner near cursor and done. App never starts. There is no any error I can tell you.... I get nothing... Last thing I've added to the app was Koin with annotations (ksp). Does this require adding anything for the build?
a
You could try redirecting System.err to a file right at the very start of your main, and see if it’s the app that crashes.
m
The first thing to do should be to run the gradle task “runReleaseDistributable” from your IDE. Most problems of this kind can be located already this way.
v
@Michael Paus thank you!! This is the way. Feel so stupid, I did not know this exists. Error is (Unsupported version number [65.0] (maximum 62.65535, Java 18)) Now I just have to figure it out, but at least I have some input now.
a
You’re compiling for Java 21
m
If you want to use Java 21 for packaging you also have to use the latest ProGuard version which can be configured this way:
Copy code
buildTypes.release {
    proguard {
        version.set("7.4.2")
        isEnabled.set(true)
        optimize.set(false)
        obfuscate.set(false)
        configurationFiles.from(project.file("compose-desktop.pro"))
    }
}
v
thank you! It worked with java 17, but with this setup from you it works also with java 21! Thx a lot!