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

plugins {
    alias(libs.plugins.kotlin.jvm)
    alias(libs.plugins.kotlin.compose)
    alias(libs.plugins.compose)
}

kotlin {
    jvmToolchain(11)

    dependencies {
        implementation(compose.desktop.currentOs)
        implementation(compose.material3)
        implementation(compose.components.resources)
        implementation(projects.commonUI)
        implementation(compose.components.uiToolingPreview)

        testImplementation(libs.kotlin.test)
        testImplementation(libs.atrium)
        testImplementation(compose.desktop.uiTestJUnit4)
        testImplementation(compose.desktop.currentOs)
    }
}

compose.desktop {
    application {
        mainClass = "MainKt"

        nativeDistributions {
            targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
            packageName = "ch.dissem.yaep"
            packageVersion = "1.0.0"

            buildTypes.release.proguard {
                configurationFiles.from(project.file("proguard-rules.pro"))
                isEnabled.set(true)
                obfuscate.set(true)
            }
        }
    }
}
