From 18b48c5303d033a56de23bfc5fd0c9a5b06f771c Mon Sep 17 00:00:00 2001 From: Elie Gambache Date: Tue, 3 Feb 2026 18:49:37 +0200 Subject: [PATCH] Add ProGuard/R8 rules documentation to README Closes #344 --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index d6331c1..3fa2772 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ - [⚠️ Platform-Specific Notes](#️-platform-specific-notes) - [Icon Limitations](#icon-limitations) - [Theme Behavior](#theme-behavior) + - [ProGuard / R8](#proguard--r8) - [🧪 TrayApp (Experimental)](#-trayapp-experimental) - [📄 License](#-license) - [🤝 Contribution](#-contribution) @@ -552,6 +553,17 @@ By default, icons are optimized by OS: 32x32px (Windows), 44x44px (macOS), 24x24 - **Windows**: Follows the system theme - **Linux**: Varies by desktop environment (GNOME/KDE/etc.) +### ProGuard / R8 + +When building a release package (e.g. via `packageReleaseUberJarForCurrentOS`), you need to add ProGuard rules to keep JNA and library classes since this library relies on reflection. Without these rules, the tray icon may render incorrectly (semi-transparent background, broken click actions, wrong tooltip). + +Add the following to your ProGuard rules file: + +``` +-keep class com.sun.jna.** { *; } +-keep class com.kdroid.composetray.** { *; } +``` + # 🧪 TrayApp (Experimental) `TrayApp` gives your desktop app a **system‑tray/menu‑bar icon** and a **tiny popup window** for quick actions. It’s perfect for quick toggles, mini dashboards, and “control center” UIs.