|
|
|
import org.jetbrains.compose.compose
|
|
|
|
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
kotlin("multiplatform") // kotlin("jvm") doesn't work well in IDEA/AndroidStudio (https://github.com/JetBrains/compose-jb/issues/22)
|
|
|
|
id("org.jetbrains.compose")
|
|
|
|
}
|
|
|
|
|
|
|
|
kotlin {
|
|
|
|
jvm {
|
|
|
|
withJava()
|
|
|
|
}
|
|
|
|
sourceSets {
|
|
|
|
named("jvmMain") {
|
|
|
|
dependencies {
|
|
|
|
implementation(compose.desktop.currentOs)
|
|
|
|
implementation(project(":common"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
compose.desktop {
|
|
|
|
application {
|
|
|
|
mainClass = "example.imageviewer.MainKt"
|
|
|
|
|
|
|
|
nativeDistributions {
|
|
|
|
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
|
|
|
|
packageName = "ImageViewer"
|
|
|
|
packageVersion = "1.0.0"
|
|
|
|
|
|
|
|
modules("jdk.crypto.ec")
|
|
|
|
|
|
|
|
val iconsRoot = project.file("../common/src/desktopMain/resources/images")
|
|
|
|
macOS {
|
|
|
|
iconFile.set(iconsRoot.resolve("icon-mac.icns"))
|
|
|
|
}
|
|
|
|
windows {
|
|
|
|
iconFile.set(iconsRoot.resolve("icon-windows.ico"))
|
|
|
|
menuGroup = "Compose Examples"
|
|
|
|
// see https://wixtoolset.org/documentation/manual/v3/howtos/general/generate_guids.html
|
|
|
|
upgradeUuid = "18159995-d967-4CD2-8885-77BFA97CFA9F"
|
|
|
|
}
|
|
|
|
linux {
|
|
|
|
iconFile.set(iconsRoot.resolve("icon-linux.png"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|