Remove JNA, add Linux ARM64 support and GraalVM native-image compatibility#381
Merged
kdroidFilter merged 12 commits intomasterfrom Apr 9, 2026
Merged
Conversation
- Move native source from maclib/, winlib/, linuxlib/ to src/native/{macos,windows,linux}/
- Remove git submodules, inline native code directly
- Move Kotlin sources from src/commonMain/ to src/jvmMain/
- Add composetray/native/ namespace for native resources (gitignored)
- Add NativeLibraryLoader utility for JNA classpath extraction
- Add GraalVM reachability metadata and native-image.properties
- Create reusable build-natives.yaml CI workflow
- Refactor pr-build-check.yml and publish-on-maven.yml to use it
- Configure demo with Nucleus plugin and GraalVM native-image support
- Add Detekt + Ktlint code quality tools
- Add .editorconfig for style consistency
- Upgrade Gradle to 9.4.1
…nstead of GetObjectClass
…ic X11 support, and update reachability metadata.
…hook Replace JNA-based Windows implementation with pure JNI, following the same patterns as Mac and Linux bridges. Add WindowsNativeBridge.kt with external JNI declarations and jni_bridge.c wrapping the tray.h C API. Rewrite WindowsTrayManager and WindowsOutsideClickWatcher to use JNI calls instead of JNA structures and callbacks. Remove all JNA dependencies from build configuration. Rename DLL output from tray.dll to WinTray.dll. Update GraalVM reachability metadata and CI workflow for JDK requirement. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ting - Replace all wildcard imports with explicit imports across main module - Break lines exceeding 120 char limit - Move inline comments to separate lines per ktlint rules - Rename MacOsWindowManager.kt to MacOSWindowManager.kt for PascalCase - Rename AppId.kt to AppIdProvider.kt to match top-level declaration - Exclude demo module from ktlint checks - Fix POM description formatting in build.gradle.kts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR is a major overhaul of the native layer:
x86_64andaarch64reachability-metadata.json,native-image.properties, and aNativeLibraryLoaderutility for proper resource extraction at runtimesrc/native/{macos,windows,linux}/with per-platform build scriptssrc/commonMain/tosrc/jvmMain/build-natives.yamlworkflow; updated PR check and publish workflowsFixes #376
Fixes #345
Test plan
./gradlew :demo:nativeCompile./gradlew :demo:run