Skip to content

Commit 18b48c5

Browse files
committed
Add ProGuard/R8 rules documentation to README
Closes #344
1 parent 963777e commit 18b48c5

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
- [⚠️ Platform-Specific Notes](#️-platform-specific-notes)
6060
- [Icon Limitations](#icon-limitations)
6161
- [Theme Behavior](#theme-behavior)
62+
- [ProGuard / R8](#proguard--r8)
6263
- [🧪 TrayApp (Experimental)](#-trayapp-experimental)
6364
- [📄 License](#-license)
6465
- [🤝 Contribution](#-contribution)
@@ -552,6 +553,17 @@ By default, icons are optimized by OS: 32x32px (Windows), 44x44px (macOS), 24x24
552553
- **Windows**: Follows the system theme
553554
- **Linux**: Varies by desktop environment (GNOME/KDE/etc.)
554555

556+
### ProGuard / R8
557+
558+
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).
559+
560+
Add the following to your ProGuard rules file:
561+
562+
```
563+
-keep class com.sun.jna.** { *; }
564+
-keep class com.kdroid.composetray.** { *; }
565+
```
566+
555567
# 🧪 TrayApp (Experimental)
556568

557569
`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.

0 commit comments

Comments
 (0)