Sam Michael
08/05/2021, 8:34 PMSam Michael
08/05/2021, 8:37 PMalexey.tsvetkov
08/06/2021, 6:09 AMCaused by: org.gradle.api.GradleException: * Illegal version for 'Msi': '1.0' is not a valid version.
* Correct format: 'MAJOR.MINOR.BUILD', where:
* MAJOR is a non-negative integer with a maximum value of 255;
* MINOR is a non-negative integer with a maximum value of 255;
* BUILD is a non-negative integer with a maximum value of 65535;
* You can specify the correct version using DSL properties: nativeDistributions.windows.msiPackageVersion, nativeDistributions.windows.packageVersion, nativeDistributions.packageVersion
This is not related to the preview. Native distributions have to follow OS specific versioning requirements. Here’s the relevant part of the docs https://github.com/JetBrains/compose-jb/tree/master/tutorials/Native_distributions_and_local_execution#specifying-package-version
The easiest way to fix the error is to set packageVersion = "1.0.0"
like here (or just not package into dmg, msi, etc…) https://github.com/JetBrains/compose-jb/blob/master/examples/widgets-gallery/desktop/build.gradle.kts#L31alexey.tsvetkov
08/06/2021, 6:12 AM1.0.0-alpha3
instead of 1.0.0-alpha1-rc1
.
With that version you don’t need to depend on compose.uiTooling
. compose.preview
is enough (also compose.desktop.currentOs
already depends on compose.preview
, so you don’t need to add a dependency for application modules, that already depend on compose.desktop.currentOs
)Sam Michael
08/06/2021, 2:06 PMpackage = "1.0.0"
then updated to 1.0.0-alpha1-rc1
then kotlin to
kotlin("jvm") version "1.5.21"
then changed window {
to
singleWindowApplication {
And вот оно!