From fcd0fea0dc468b672f842a8a5ab7ac84b180f0e2 Mon Sep 17 00:00:00 2001 From: Raman Gupta Date: Tue, 13 Oct 2026 09:43:25 -0400 Subject: [PATCH 1/3] chore: update to 3.0-dev --- gradle/libs.versions.toml | 2 +- src/main/kotlin/com/gitvantage/ui/Main.kt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index db0165a..29003a6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -7,7 +7,7 @@ humanReadable = "2.0.0" konture = "1.0.2" kotlin = "2.4.21" kotlinxSerialization = "1.12.0" -nucleus = "2.5.18" +nucleus = "3.0.0-dev-202610091014" slf4j = "2.0.20" testBalloon = "1.2.0" diff --git a/src/main/kotlin/com/gitvantage/ui/Main.kt b/src/main/kotlin/com/gitvantage/ui/Main.kt index 001cbbf..f72b73e 100644 --- a/src/main/kotlin/com/gitvantage/ui/Main.kt +++ b/src/main/kotlin/com/gitvantage/ui/Main.kt @@ -49,7 +49,6 @@ import com.gitvantage.app.Tokens import com.gitvantage.app.UiScale import com.gitvantage.smoke.runSmokeChecks import dev.nucleusframework.application.DecoratedWindow -import dev.nucleusframework.application.NucleusBackend import dev.nucleusframework.application.nucleusApplication import dev.nucleusframework.core.runtime.SingleInstanceManager import dev.nucleusframework.window.NucleusDecoratedWindowTheme @@ -135,7 +134,7 @@ internal val appIcon: Painter by lazy { } @OptIn(FlowPreview::class) -private fun runApp() = nucleusApplication(backend = NucleusBackend.Tao) { +private fun runApp() = nucleusApplication { adoptContextClassLoader() val saved = Registry.settings() // Before the first frame, so the window is painted in the right theme rather than flashing From c2c7023c3aa36a0687aabcee76d025360daef411 Mon Sep 17 00:00:00 2001 From: Raman Gupta Date: Wed, 2 Dec 2026 11:37:54 -0500 Subject: [PATCH 2/3] deps: update Nucleus to the 3.0.0 release Move from the 3.0.0 dev build to the 3.0.0 release. The release renames the Tao window module from decorated-window-tao to window-runtime, so the dependency follows it. It is still declared directly because the app calls TitleBar. Nucleus 3.0.0 requires the Compose plugin at 1.13, so Compose goes from 1.12.2 to 1.13.0. With the older plugin, Gradle upgrades the Compose libraries anyway, but the plugin injects a Hot Reload agent that the Tao backend does not support. Signed-off-by: Raman Gupta --- build.gradle.kts | 5 +++-- gradle/libs.versions.toml | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index d194675..a4d1150 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -145,8 +145,9 @@ dependencies { implementation(compose.desktop.currentOs) // The entry-point module — provides nucleusApplication and DecoratedWindow implementation(libs.nucleus.application) - // Enable the Tao backend (Rust-native windowing) - implementation(libs.nucleus.decorated.window.tao) + // The Tao windowing runtime (Rust-native). Transitive via nucleus-application, but TitleBar is + // called directly, so it is declared directly. + implementation(libs.nucleus.window.runtime) // The desktop's light/dark preference (XDG portal on Linux, native on macOS/Windows), pushed // as it changes. Already on the classpath via nucleus-application — which installs it over // Compose's LocalSystemTheme — but Theme.kt calls it directly, so it is declared directly. diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 29003a6..91dc4f6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -compose = "1.12.2" +compose = "1.13.0" detekt = "2.0.0-alpha.6" dbusJava = "5.2.2" fileKit = "0.17.0" @@ -7,7 +7,7 @@ humanReadable = "2.0.0" konture = "1.0.2" kotlin = "2.4.21" kotlinxSerialization = "1.12.0" -nucleus = "3.0.0-dev-202610091014" +nucleus = "3.0.0" slf4j = "2.0.20" testBalloon = "1.2.0" @@ -31,7 +31,7 @@ konture = { module = "io.github.baole:konture", version.ref = "konture" } kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerialization" } nucleus-application = { module = "dev.nucleusframework:nucleus.nucleus-application", version.ref = "nucleus" } nucleus-darkmode-detector = { module = "dev.nucleusframework:nucleus.darkmode-detector", version.ref = "nucleus" } -nucleus-decorated-window-tao = { module = "dev.nucleusframework:nucleus.decorated-window-tao", version.ref = "nucleus" } +nucleus-window-runtime = { module = "dev.nucleusframework:nucleus.window-runtime", version.ref = "nucleus" } nucleus-fsWatcher = { module = "dev.nucleusframework:nucleus.fs-watcher", version.ref = "nucleus" } nucleus-notification-common = { module = "dev.nucleusframework:nucleus.notification-common", version.ref = "nucleus" } slf4j-simple = { module = "org.slf4j:slf4j-simple", version.ref = "slf4j" } From c1464a939100f8ed253b09160c715d933da651d8 Mon Sep 17 00:00:00 2001 From: Raman Gupta Date: Wed, 2 Dec 2026 11:37:59 -0500 Subject: [PATCH 3/3] fix(build): pass the .rpm and .deb version through the Nucleus DSL The .rpm and .deb get the full pre-release version, for example 1.6.2-alpha.7, through a package.json the build wrote before each packaging run. That worked around two Nucleus 2.5.18 behaviours: it wrote package.json only if the file did not exist yet, and it rejected any '-' in an Rpm version. Nucleus 3.0.0 fixes both. It now validates only the x.y.z part of a pre-release version, and it rewrites package.json on every run. The rewrite happens in the task action, after the build's doFirst, so the workaround's file would be overwritten with the plain x.y.z. The full version now goes through linux.packageVersion instead, and the workaround is removed. The .msi and .dmg keep the plain x.y.z from the top-level packageVersion. A packaging run produces an .rpm and a .deb versioned 1.6.2~alpha.16.dirty, which rpm sorts after 1.6.1 and before 1.6.2. Signed-off-by: Raman Gupta --- build.gradle.kts | 40 ++++------------------------------------ 1 file changed, 4 insertions(+), 36 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index a4d1150..de9554f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -317,6 +317,10 @@ nucleus.application { // shortcut, macOS dock/Finder) gets a real icon. Each format must be built on its own // OS (jpackage limitation), but the icon is wired up for when it is. linux { + // The full version, pre-release included: electron-builder turns the '-' into '~' for + // .rpm and .deb, which sorts 1.6.2~alpha.7 after 1.6.1 and before 1.6.2. The .msi and + // .dmg keep the plain x.y.z above, the only form they take. + packageVersion = buildVersion.display iconFile.set(File(projectDir, "packaging/icons/icon.png")) // .deb + .rpm packageName = "gitvantage" // lowercase: Debian policy debMaintainer = "raman@inner.tech" @@ -635,42 +639,6 @@ tasks.matching { it.name.startsWith("packageGraalvm") && it.name != "packageGraa dependsOn(verifyGraalvmNativeImage, smokeTestNativeImage, smokeTestNativeImageSubsystems) } -// The .rpm/.deb version, written where electron-builder reads it. -// -// Nucleus (2.5.18) hands electron-builder its version through a package.json in the output folder, -// and writes that file only if it doesn't exist yet: once written it was never refreshed, so every -// later build kept the first build's version. And the version a pre-release needs can't reach it -// through the DSL: electron-builder accepts only semver ("1.6.2-alpha.7"), which Nucleus's -// configuration-time check rejects for Rpm because the version has a '-'. -// -// So for the Linux packagers the file is written here, before each run, with the full version — -// electron-builder itself turns the '-' into '~' for .rpm and .deb, which sorts 1.6.2~alpha.7 after -// 1.6.1 and before 1.6.2. The other packagers get the file deleted instead, so Nucleus writes it -// afresh from the plain x.y.z that .msi and .dmg require. -tasks.withType().configureEach { - val packageJson = destinationDir.file("package.json") - val linux = name.contains("Rpm") || name.contains("Deb") - val version = buildVersion.display - inputs.property("fullVersion", version) // the DSL only sees x.y.z; alpha.7 → alpha.8 must still repackage - doFirst { - val file = packageJson.get().asFile - if (!linux) { file.delete(); return@doFirst } - file.parentFile.mkdirs() - file.writeText( - """ - |{ - | "name": "gitvantage", - | "version": "$version", - | "description": "A git status dashboard for people who juggle a lot of repositories.", - | "author": "Raman Gupta", - | "private": true - |} - | - """.trimMargin(), - ) - } -} - // --- Subsystem checks on the development classpath ---------------------------------------------- //