Hi folks. Is it possible to set a different `packa...
# compose-desktop
k
Hi folks. Is it possible to set a different
packageName
per platform? I've been trying various combinations but it leads to strange results. For example, setting
nativeDistributions.packageName
and
nativeDistributions.macOS.packageName
results in
nativeDistributions.packageName
being used. If I also set
nativeDistributions.windows.packageName
the outcome is that the package name for windows is used for all platforms e.g.:
Copy code
compose.desktop {
    application {
        mainClass = "org.example.project.MainKt"

        nativeDistributions {
            targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
            packageName = "org.example.project"
            packageVersion = "1.0.0"

            macOS {
                packageName = "Foo"
            }

            windows {
                packageName = "Bar"
            }
        }
    }
}
e
no, you're changing the same
packageName
property across the whole
nativeDistributions
at configuration time, there isn't one for platform's settings
👍 1
K 1
j
I guess a way could be to build the package name based on a parameter you pass in during a specific platform build
👍 1
K 1
k
That's a good idea! I just wanted to make sure I'm not missing something with the config. The way
nativeDistributions
is organised, one has the impression that each platform offers an "override" to the global values when used. Our use case is that the package name for Windows needs to be different than any other platform and so indeed, I will try to use a parameter. Thank you both!