18 Commits
Author SHA1 Message Date
Elie Gambache b1d7403eb7 fix: make new coverage tests portable across CI OS
JNI libraries share a name across platforms, so isLoaded is not a
platform check. Gate Linux-only native calls, skip headless AWT and
off-OS launchd, and accept notification/hotkey failure when the
desktop service is missing.
2026-08-18 15:24:05 +03:00
Elie Gambache 7bce07783d test: cover Linux natives and merge Kover across OS
Make the 75% floor the union of Linux, macOS and Windows reports
instead of a single-OS check. Exercise systemd, D-Bus, hidpi and
Linux JNI paths, and fix disableEfficiencyMode EACCES plus a
Windows getAllTasks UnsatisfiedLinkError off-host.
2026-08-18 14:13:20 +03:00
Elie Gambache 0fdd1ecd2a test: add Kover aggregation and published-runtime coverage tests
Enable kotlinx-kover 0.9.8 on library modules with a 75% line-coverage
floor. Generated icon/symbol catalogues stay excluded; production
packages are not filtered to inflate the number.

Also fix three bugs found while writing tests:
- Version.fromString treats empty semver groups as 0
- FileSelector maps the exe format to .exe
- system-info Linux/Windows backends require the matching Platform
2026-08-18 13:28:53 +03:00
Elie Gambache 3792b25122 Merge pull request #491 from NucleusFramework/fix/488-cleanups
Cleanups: unify logging on JUL, rename leaked ComposeNativeTray API, enforce KDoc
2026-08-09 08:35:46 +03:00
Elie Gambache 6fe04b907e build(detekt): enforce KDoc on public classes and functions
UndocumentedPublicClass and UndocumentedPublicFunction were off, so KDoc
on public API was entirely voluntary and coverage drifted. Turn both on
and grandfather the existing 419 gaps in per-module detekt-baseline.xml
files, which detekt picks up automatically: pre-existing gaps stay
green, any new undocumented public class or function fails the build.

UndocumentedPublicProperty stays off — it reports 7618 hits, 6493 of
them generated constants in sf-symbols and freedesktop-icons.

Also flip config.warningsAsErrors, which governs detekt's own config
validation, so a deprecated or unknown config key fails instead of
warning as detekt is upgraded.
2026-08-09 08:05:08 +03:00
Elie Gambache 9d53d945b1 refactor(build): extract a nucleus.native-module convention plugin
Every native JNI module carried its own copy of the buildNative* Exec
boilerplate (~25 modules), and the copies had drifted: relative vs
absolute build-script paths, `enabled =` vs `onlyIf {}` guards, and
three spellings of the macOS task name.

A buildSrc convention plugin now owns the whole wiring — task
registration, source inputs, resources output, host-OS and
prebuilt-on-CI guards, absolute script invocation, NativeLibraryLoader
cache eviction, and the processResources/sourcesJar dependencies — so a
module declares one line per platform.

Also drops the root `tasks.withType<Exec>()` block that patched inputs
and guards onto the modules after the fact; it was clobbering each
module's own prebuilt guard on non-CI machines.
2026-08-09 07:55:31 +03:00
Elie Gambache 657d907432 feat: freeze public ABI for all published runtime modules
Apply kotlinx binary-compatibility-validator and Kotlin explicitApi() at the
root for every non-example module (same harness as decorated-window-tao).
Commit api/*.api baselines, wire apiCheck into preMerge, and document the
workflow. decorated-window-jewel keeps explicitApi but is skipped by BCV until
ASM can read JVM 25 class files.
2026-08-07 08:14:38 +03:00
Elie G. d7b2e3d61f fix(ci): replace hardcoded VS versions with vswhere detection
All 15 native build.bat scripts now use vswhere (resolves any installed
VS version including 18+) with fallback to hardcoded paths for edge cases.
Fixes CI failure when runner image upgrades Visual Studio versions.
2026-06-14 06:17:10 +03:00
Elie Gambache dc157c0168 chore: migrate namespace to dev.nucleusframework 2026-05-11 18:12:02 +03:00
Elie Gambache bed9f98e68 fix: resolve ktlint and detekt violations 2026-05-11 10:37:11 +03:00
Elie G. 74230eaf27 style: apply ktlint formatting across modules 2026-05-10 22:17:44 +03:00
Elie G. c42d0e7ced feat(taskbar-progress-tao): implement Tao backend support with unified NucleusWindow API
New taskbar-progress-tao adapter module providing Tao-backed window support. Adds NucleusTaskbarProgress facade that transparently dispatches to correct backend (AWT or Tao) via runtime window type checking. All operations offloaded to daemon thread to prevent shutdown deadlocks. Refactored example to use backend-agnostic NucleusWindow API.

- New module: taskbar-progress-tao with TaoTaskbarProgress and NucleusTaskbarProgress
- Unified API: extension functions on NucleusWindow (transparent to callers)
- Threading: all native calls offloaded to executor (non-blocking, prevents freeze-on-close)
- Platform support: Windows ITaskbarList3 via HWND, macOS/Linux delegates to existing implementations
- Example refactored: removes backend-specific dispatch logic
2026-05-10 22:17:02 +03:00
Elie Gambache 6ca6b1656d refactor: replace compileOnly with implementation/api for runtime dependencies
Replace compileOnly declarations with implementation or api depending on
whether types are exposed in public API signatures. Core-runtime is now
implementation (transitively provided at runtime). Dependencies appearing
in public method signatures use api scope. Update documentation to reflect
transitive dependency availability.
2026-04-19 08:09:35 +03:00
Elie Gambache 6737708410 feat(global-hotkey): add Linux implementation with X11 and Wayland portal backends
Implement cross-platform global hotkey support for Linux:

- X11 backend: XGrabKey/XUngrabKey with 16 lock-mask combinations, polling thread
- Wayland backend: org.freedesktop.portal.GlobalShortcuts via GIO/GDBus with GMainLoop

Refactoring:
- Move LinuxDesktopFileDetector from taskbar-progress to core-runtime (no duplication)
- Add Platform.isWayland to core-runtime
- Add NativeLinuxHotKeyBridge JNI bridge (same pattern as macOS/Windows)

Key fix for GNOME portal: recreate session before each BindShortcuts call.
GNOME's portal implementation rejects multiple BindShortcuts on the same session,
so we close the old session and create a fresh one for each bind operation.

Update example app to use reverse-DNS package name (io.github.kdroidfilter.NucleusDemo)
and avoid Ctrl+Alt+Fn combinations (trigger VT switching on Linux).
2026-03-27 14:01:03 +03:00
Elie Gambache 244fa1bbed feat: add launcher-linux module with full Unity Launcher API mapping
Add new launcher-linux module implementing the com.canonical.Unity.LauncherEntry
D-Bus interface (count, progress, urgency, quicklist, updating properties).

Refactor taskbar-progress to delegate its Linux backend to launcher-linux
instead of maintaining its own JNI/C implementation, removing the redundant
native code.

Update all CI workflows to build/distribute the new launcher-linux native
library and remove the now-unnecessary taskbar-progress Linux .so artifacts.
2026-03-26 11:32:35 +02:00
Elie Gambache ffae01b544 feat: add Linux taskbar progress via DBus (com.canonical.Unity.LauncherEntry)
Implements cross-platform taskbar progress for Linux using the DBus
com.canonical.Unity.LauncherEntry protocol (GNOME, KDE, others).

Key features:
- Auto-detects .desktop filename from NucleusApp.appId (plugin-injected packageName)
  with fallback to GIO_LAUNCHED_DESKTOP_FILE, BAMF_DESKTOP_FILE_HINT, or XDG scan
- Linux JNI bridge (GLib/GIO) emits Update signals with progress/urgent properties
- 15KB native .so for x64/aarch64, compiled with pkg-config GIO flags
- Supports all State enum variants (progress bar color varies by state)
- Attention requests via DBus urgent flag

TaskbarProgress.isAvailable() now returns true on Linux when the .desktop file exists.
Extracted desktop file detection into LinuxDesktopFileDetector for code clarity.
2026-03-22 01:31:33 +02:00
Elie Gambache f047553534 feat: add macOS dock progress support to taskbar-progress module
Implement NSDockTile-based progress indicator with custom NSProgressIndicator
subclass. Supports progress values, states (normal/error/paused/indeterminate),
and attention requests (bounce). Auto-promotes setProgress to NORMAL state when
no explicit state set, matching Windows behavior. Updates example to auto-show
progress bar when slider moves from initial NO_PROGRESS state.
2026-03-22 00:53:54 +02:00
Elie G. 9162d81396 feat: add taskbar-progress module (Windows ITaskbarList3 + FlashWindowEx)
New module providing Windows taskbar progress indicator and attention
request via JNI (ITaskbarList3 COM and FlashWindowEx). Noop on macOS/Linux.

API: TaskbarProgress.showProgress/showError/showPaused/showIndeterminate/
hideProgress/requestAttention/stopAttention. Example app includes a
Taskbar tab to demo all features.
2026-03-22 00:53:53 +02:00