Retire the AWT/JBR/JNI window backends, leaving only Tao - #593
Open
kdroidFilter wants to merge 1 commit into
Open
Retire the AWT/JBR/JNI window backends, leaving only Tao#593kdroidFilter wants to merge 1 commit into
kdroidFilter wants to merge 1 commit into
Conversation
Tao is now the single window backend. Removes the three AWT-based modules
(`decorated-window-awt`, `-jbr`, `-jni`) with their native sources, API
dumps, detekt baselines and GraalVM metadata, plus the `jni-demo` sample.
BREAKING CHANGE: `NucleusBackend`, `LocalNucleusBackend`, the `backend =`
parameter of `nucleusApplication`, `NucleusApplicationScope.backend` and
`NucleusWindowUnsafe.awtWindow` / `awtDialog` are gone, as are the AWT
overloads of `MaterialDecoratedWindow` / `MaterialDecoratedDialog` (M2, M3)
and `JewelDecoratedWindow` / `JewelDecoratedDialog` — only the
`NucleusApplicationScope` receivers remain. Compose Desktop's AWT `Window`,
`Dialog` and `Tray` are unsupported; use `DecoratedWindow`, `HostedWindow` /
`HostedDialog` and an AWT-free tray.
- nucleus-application: drops the AWT scope/window/dialog adapters and takes
`api(project(":decorated-window-tao"))`, since the backend is no longer a
consumer choice and a missing runtime module would only fail at launch
- material2: ports `MaterialDecoratedDialog` to a `NucleusApplicationScope`
receiver — it existed only in AWT form, so M2 keeps parity with M3
- removing the AWT overloads also retires the `LowPriorityInOverloadResolution`
/ `INVISIBLE_REFERENCE` workarounds they needed
- taskbar-progress-tao: single Tao dispatch path
- core-runtime keeps `WindowBackend.Awt`: it still describes a plain Compose
Desktop / Swing host embedding Nucleus libraries
- scheduler-demo moves to Tao (drops the `java.desktop/sun.*` add-opens);
service-management-demo swaps `java.awt.EventQueue` for
`rememberCoroutineScope().launch`, as SMAppService completion handlers must
hop to the Tao main thread
- drops the now-unused `jbr-api` catalog entry, the jni/jbr native build steps
and verify entries from CI, and rewrites the backend docs
- also adds `rect-stress-demo` / `widget-demo` to `apiValidation.ignoredProjects`
alongside the other demos, fixing their pre-existing `apiCheck` failures
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.
Tao becomes the single window backend.
decorated-window-awt,decorated-window-jbranddecorated-window-jniare deleted with their native sources, API dumps, detekt baselines and GraalVM reachability metadata, along with thejni-demosample (~10k lines removed).Summary
decorated-window-awt,decorated-window-jbr,decorated-window-jni,examples/jni-demo(+settings.gradle.kts/apiValidationwiring, thejbr-apiversion-catalog entry, the jni/jbr native build steps and verify entries inbuild-natives/pre-merge/publish-maven).nucleus-application: drops the AWT application scope, window and dialog adapters;decorated-window-taomoves fromcompileOnlytoapi, since the backend is no longer a consumer choice and a missing runtime module would otherwise only fail at launch.MaterialDecoratedWindow/MaterialDecoratedDialog(M2 + M3) andJewelDecoratedWindow/JewelDecoratedDialogare gone — only theNucleusApplicationScopereceivers remain, which also retires theLowPriorityInOverloadResolution/INVISIBLE_REFERENCEworkarounds they required.material2's dialog existed only in AWT form, so it is ported to aNucleusApplicationScopereceiver to keep parity with M3.taskbar-progress-tao: single Tao dispatch path instead of the AWT/Tao fork.core-runtimekeepsWindowBackend.Awt: it still describes a plain Compose Desktop / Swing host that embeds Nucleus libraries. The plugin'sjbr-apiProGuard keep and AOT unsealing workarounds also stay, since an app can still shipjbr-apiitself.scheduler-demojni → Tao (drops thejava.desktop/sun.*add-opens);service-management-demoswapsjava.awt.EventQueueforrememberCoroutineScope().launch, because SMAppService completion handlers must now hop to the Tao main thread. Thebackend = NucleusBackend.Taoargument is dropped from the eight other demos.decorated-window-jni/-jbr/-awtreferences in Tao's KDoc and comments.rect-stress-demoandwidget-demoare added toapiValidation.ignoredProjectsalongside the other demos, fixing their pre-existingapiCheckfailures.Breaking changes
Removed from the public API (
apiDumpregenerated):NucleusBackend,LocalNucleusBackend,nucleusApplication(backend = …),NucleusApplicationScope.backendNucleusWindowUnsafe.awtWindow/awtDialogApplicationScope/ receiver-less AWT overloads in the Material 2, Material 3 and Jewel modulesMigration: depend on
nucleus.decorated-window-tao, drop thebackend =argument, and replace AWT-typed window access and Compose Desktop'sWindow/Dialog/TraywithnucleusWindow,HostedWindow/HostedDialogand an AWT-free tray. Documented in the README's project-status section.Docs describe the removal as landing in 2.6 —
v2.5.0is already tagged without it. Three occurrences to change if this should ship as3.0.0instead.Test plan
./gradlew testClasses— every module and demo compiles./gradlew test— all unit tests pass (NucleusApplicationScopeTestported to the Tao scope)./gradlew apiCheck/apiDumpcommitted./gradlew ktlintCheck detekt— clean, no baseline regeneration./gradlew preMerge— green exceptplugin-build'sLinuxSignerTest, which fails ongpg --gen-keylocally and reproduces identically on a clean worktree atmain(pre-existing, environmental)scheduler-demoon macOS/JDK 25 — Jewel window renders with native traffic lightsservice-management-demoon macOS/JDK 25 — Material 3 window renders,SMAppService: Available