- A tray icon (the app icon) is there for as long as wIRC runs. Left click hides or shows every wIRC window; right click has Show wIRC, Hide wIRC and Exit. Exit disconnects every server and quits. - No wIRC window has a taskbar button. Each window is given a hidden owner window through JNA, because Window.Type.UTILITY can't be set after Compose builds the window and would take wIRC main's minimize button away. - Minimizing any window hides all of them to the tray. Showing them again puts each one back where it was. Hidden windows stay connected and keep filling their buffers. Closing a window with X works the same as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
52 lines
1.9 KiB
Kotlin
52 lines
1.9 KiB
Kotlin
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
|
|
|
plugins {
|
|
kotlin("jvm") version "1.9.24"
|
|
id("org.jetbrains.compose") version "1.6.11"
|
|
}
|
|
|
|
group = "com.tpuahsiew.wirc"
|
|
version = "0.1.14"
|
|
|
|
// No project-level repositories{} block here: settings.gradle.kts sets
|
|
// dependencyResolutionManagement.repositoriesMode = FAIL_ON_PROJECT_REPOS and already
|
|
// declares google()/mavenCentral()/the compose dev repo there, so a duplicate block in
|
|
// this file would conflict with that policy and fail the build.
|
|
|
|
dependencies {
|
|
implementation(compose.desktop.currentOs)
|
|
implementation(compose.material3)
|
|
// Icons.Default.{Person,Settings} used by the settings-gear/user-list toggle in
|
|
// ChannelScreen live in material-icons-core, which materialIconsExtended pulls in -
|
|
// compose.material3 alone doesn't include it.
|
|
implementation(compose.materialIconsExtended)
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:1.8.1")
|
|
implementation("org.json:json:20240303")
|
|
// Native Windows calls that keep wIRC's windows off the taskbar (see AppTray.kt)
|
|
implementation("net.java.dev.jna:jna-platform:5.14.0")
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(17)
|
|
}
|
|
|
|
compose.desktop {
|
|
application {
|
|
mainClass = "MainKt"
|
|
nativeDistributions {
|
|
// Bundles installerResources/ (aliases.txt starter file, etc.) into the
|
|
// installed app directory, available at runtime via the
|
|
// compose.application.resources.dir system property.
|
|
appResourcesRootDir.set(project.file("installerResources"))
|
|
targetFormats(TargetFormat.Msi, TargetFormat.Exe)
|
|
packageName = "wIRC"
|
|
packageVersion = "0.1.14"
|
|
windows {
|
|
menuGroup = "wIRC"
|
|
upgradeUuid = "8f14e45f-ceea-4a5e-9c3b-5b1f0e8c2b7a"
|
|
iconFile.set(project.file("icon.ico"))
|
|
}
|
|
}
|
|
}
|
|
}
|