Description
Upgrade the desktop app from Nucleus 1.x to Nucleus 2 so Foliary uses the current plugin ID, Maven coordinates, package namespace, and application bootstrap model. The current desktop entry point still relies on application {} plus manual deep-link and single-instance handling; Nucleus 2 replaces that with nucleusApplication(args), automatic bootstrap, and renamed dev.nucleusframework APIs. This migration should preserve current desktop behavior while reducing custom startup plumbing and aligning follow-up desktop work, including AOT cache setup, with the supported API surface.
Scope and constraints
- Migrate the desktop module from Nucleus
1.15.6 / io.github.kdroidfilter.* to Nucleus 2 / dev.nucleusframework.*
- Update the Gradle plugin ID, dependency coordinates, DSL imports, and Kotlin imports touched by the migration
- Replace the current desktop startup path in
desktop/src/main/kotlin/Main.kt with nucleusApplication(args) and move deep-link handling to the Nucleus 2 API
- Remove or adapt manual single-instance and restore logic in
ManageSingleInstance.kt and DecoratedWindow.kt where Nucleus 2 now provides the behavior automatically
- Preserve the current Material 3 decorated window, tray integration, deep-link dispatch, and packaging targets
- Do not expand scope into unrelated desktop UX changes, auto-update work, or non-desktop platform changes
- If the selected Nucleus 2 artifacts require extra repository or toolchain changes, include only the minimal build changes needed for this migration
References
Scope
In scope: version/catalog updates, package and import renames, desktop bootstrap migration, removal of 1.x-only startup plumbing, and validation that desktop runtime behavior still works under Nucleus 2.
Out of scope: redesigning window or tray UX, enabling new optional Nucleus features, changing packaging targets, or making Android/iOS-specific changes unrelated to shared import updates.
Acceptance criteria
Additional information
Current files likely touched by this migration include:
gradle/libs.versions.toml
desktop/build.gradle.kts
desktop/src/main/kotlin/Main.kt
desktop/src/main/kotlin/ManageSingleInstance.kt
desktop/src/main/kotlin/DeeplinkHandler.kt
desktop/src/main/kotlin/DecoratedWindow.kt
foliary/src/jvmMain/kotlin/dev/appoutlet/foliary/feature/main/MainScreen.jvm.kt
The current codebase does not appear to use Jewel-specific window components, so JDK 25 and the IntelliJ snapshots repository should be treated as conditional migration requirements rather than assumed baseline changes.
Description
Upgrade the desktop app from Nucleus 1.x to Nucleus 2 so Foliary uses the current plugin ID, Maven coordinates, package namespace, and application bootstrap model. The current desktop entry point still relies on
application {}plus manual deep-link and single-instance handling; Nucleus 2 replaces that withnucleusApplication(args), automatic bootstrap, and renameddev.nucleusframeworkAPIs. This migration should preserve current desktop behavior while reducing custom startup plumbing and aligning follow-up desktop work, including AOT cache setup, with the supported API surface.Scope and constraints
1.15.6/io.github.kdroidfilter.*to Nucleus 2 /dev.nucleusframework.*desktop/src/main/kotlin/Main.ktwithnucleusApplication(args)and move deep-link handling to the Nucleus 2 APIManageSingleInstance.ktandDecoratedWindow.ktwhere Nucleus 2 now provides the behavior automaticallyReferences
gradle/libs.versions.tomldesktop/src/main/kotlin/Main.ktScope
In scope: version/catalog updates, package and import renames, desktop bootstrap migration, removal of 1.x-only startup plumbing, and validation that desktop runtime behavior still works under Nucleus 2.
Out of scope: redesigning window or tray UX, enabling new optional Nucleus features, changing packaging targets, or making Android/iOS-specific changes unrelated to shared import updates.
Acceptance criteria
io.github.kdroidfilter1.x setup, and all migrated imports compile under thedev.nucleusframeworknamespacenucleusApplication(args)and uses the Nucleus 2 deep-link API instead of manualDeepLinkHandler.register(...)bootstrap inMain.ktAdditional information
Current files likely touched by this migration include:
gradle/libs.versions.tomldesktop/build.gradle.ktsdesktop/src/main/kotlin/Main.ktdesktop/src/main/kotlin/ManageSingleInstance.ktdesktop/src/main/kotlin/DeeplinkHandler.ktdesktop/src/main/kotlin/DecoratedWindow.ktfoliary/src/jvmMain/kotlin/dev/appoutlet/foliary/feature/main/MainScreen.jvm.ktThe current codebase does not appear to use Jewel-specific window components, so JDK 25 and the IntelliJ snapshots repository should be treated as conditional migration requirements rather than assumed baseline changes.