3

I have desktop app written with compose, I am workinkg on Mac. Everything works fine for mac builds, but I am unable to produce one for linux.

dependencies {
    implementation(compose.desktop.linux_x64)
    implementation(compose.desktop.macos_x64)
[...]
}
compose.desktop {
    application {
        mainClass = "pl.rtsm.myapp.ApplicationKt"
        jvmArgs += listOf("-Xmx12G")
        nativeDistributions {
            targetFormats(TargetFormat.Deb, TargetFormat.Dmg)
            outputBaseDir.set(project.buildDir.resolve("installers"))
            packageName = "MyApp"
        }
    }
}

Whatever I specify in targetFormats it only produces Mac app. Only thing in debug logs I've found is that this task is skipped (even though I am running task from clean state):

2022-01-09T18:11:57.948+0100 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] > Task :packageDeb SKIPPED
2022-01-09T18:11:57.948+0100 [INFO] [org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter] Skipping task ':packageDeb' as task onlyIf is false.

Is it possible to create linux builds on Mac? Something is missing?

rtsm
  • 41
  • 3
  • Usually the way releases work is, you build the release for each platform on that platform. I am assuming Compose Desktop is no different in this regard, but yeah, I too wish that one machine could build all the releases in a single build, without resorting to containers. – Hakanai Jun 25 '22 at 08:31

0 Answers0