import org.jetbrains.compose.desktop.application.dsl.TargetFormat

plugins {
    id "org.jetbrains.kotlin.jvm"
    id "org.jetbrains.compose"
}

repositories {
    jetbrainsCompose()
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib"
    implementation compose.desktop.currentOs
}

kotlin {
    jvmToolchain {
        languageVersion.set(JavaLanguageVersion.of(11))
    }
}

compose.desktop {
    application {
        mainClass = "MainKt"
        nativeDistributions {
            targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)

            packageVersion = "1.0.0"
            packageName = "TestPackage"
            description = "Test description"
            copyright = "Test Copyright Holder"
            vendor = "Test Vendor"

            linux {
                shortcut = true
                packageName = "test-package"
                debMaintainer = "example@example.com"
                menuGroup = "menu-group"
            }
            windows {
                console = true
                dirChooser = true
                perUserInstall = true
                shortcut = true
                menu = true
                menuGroup = "compose"
                upgradeUuid = "2d6ff464-75be-40ad-a256-56420b9cc374"
            }
            macOS {
                dockName = "CustomDockName"
            }
        }
    }
}
