JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
16.24k stars 1.18k forks source link

Illegal version for 'Msi': '1.0' is not a valid version #432

Closed shalaga44 closed 3 years ago

shalaga44 commented 3 years ago

I updated org.jetbrains.compose to version "0.3.0" using kotlin 1.4.31 on Ubuntu 20.04 LTS and now I can't target ms anymore

> * 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

from where I can get the msiPackageVersion ?

import org.jetbrains.compose.compose
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    kotlin("jvm") version "1.4.31"
    //https://github.com/JetBrains/compose-jb/tags
    id("org.jetbrains.compose") version "0.3.0"
}

group = "com.shalaga44"
version = "1.0"

repositories {
    jcenter()
    mavenCentral()
    maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
}

dependencies {
    testImplementation(kotlin("test-testng"))
    implementation(compose.desktop.currentOs)
}

tasks.test {
    useTestNG()
}

tasks.withType<KotlinCompile>() {
    kotlinOptions.jvmTarget = "11"
}

compose.desktop {
    application {
        mainClass = "MainKt"
        nativeDistributions {
            targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
            packageName = "Jetpack-Compose-Animation"
        }
    }
}
AlexeyTsvetkov commented 3 years ago

@shalaga44 please see the corresponding docs https://github.com/JetBrains/compose-jb/tree/master/tutorials/Native_distributions_and_local_execution#specifying-package-version

You can either use a single value, that complies with versioning requirements of all requested target formats (e.g. 1.0.0) or you can specify a separate version for each target format.

okushnikov commented 3 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.