Conversation
Preparation for the Tauri migration (#35). The Kotlin/Swing code now lives as a peer Gradle subproject alongside :agent and :demo, freeing the repo root for the upcoming Tauri shell (src/, src-tauri/) without clobbering the existing JVM build. - Move src/ to jvm/src/ (git tracks renames; per-file history preserved) - New jvm/build.gradle.kts owns the JVM plugins, dependencies, shadowJar, and processResources/agentJar wiring - Root build.gradle.kts shrinks to a 5-line orchestrator (group + spotless for kotlinGradle) - Drop the application plugin, :run task, and startScripts wiring; the Tauri shell will load the shadow jar via j4rs instead of launching it through Gradle - Remove .run/Decompiler.run.xml; the dev run config will be Tauri- shaped going forward
Initial Tauri 2 project bootstrapped via the official template. Empty shell — window opens, no functionality wired yet. Lives alongside the :agent / :demo / :jvm Gradle subprojects at the repo root. Refs #35
Distinguishes the JVM tier in the polyglot tree from the rest of the
project (Tauri's src/ React, src-tauri/ Rust, demo/, agent/). Mirrors
the package layout :agent and :demo already use.
- All Java/Kotlin sources under jvm/src/main/{java,kotlin}/moe/sota/
decompiler/ moved into a nested jvm/ subdirectory (git tracks 44 of
46 as renames; two files lost the rename match because content
shifted enough during the package update)
- Package declarations and intra-module imports rewritten via sed:
moe.sota.decompiler[.X] -> moe.sota.decompiler.jvm[.X]
- No FQCN strings, resource paths, or external imports referenced the
old package, so :agent and :demo are untouched
Refs #35
- src-tauri/rust-toolchain.toml: pin Rust to the stable channel so contributors and CI converge on the same toolchain - bun.lock: lockfile from initial `bun install` - src-tauri/Cargo.lock: lockfile from initial `cargo metadata` resolve Refs #35
- mise.toml: pin Java to latest (the only tool without a native version file in this project) - .bun-version: pin Bun to 1.3.13; mise reads this natively, same way it picks up rust-toolchain.toml - package.json: add packageManager field as the JS-ecosystem-standard alternative for tooling that doesn't go through mise (Corepack, etc.) Together with the existing rust-toolchain.toml and gradle-wrapper.properties, this means a contributor can run `mise install && bun install` and have all four runtimes (Java, Bun, Rust, Gradle) at the project's pinned versions. Refs #35
Mirrors the Swing WindowView's preferredSize (1000x600 -> bumped to 1000x700 for a touch more vertical room) and minimumSize (500x300). Title goes from the default lowercase "decompiler" to "Decompiler". Refs #35
Newer mise versions disable idiomatic version file detection (.bun-version, rust-toolchain.toml, etc.) by default, and even when enabled they only resolve from the current directory upward — so src-tauri/rust-toolchain.toml is invisible when running mise from the repo root. Listing tools explicitly in mise.toml makes them all visible from anywhere in the project. - Add bun and rust to [tools] - Drop .bun-version (now redundant) - package.json packageManager kept for the JS ecosystem; rust-toolchain.toml kept for rustup's native activation inside src-tauri/ Refs #35
Mirror the src-tauri/ pattern: each ecosystem in its own top-level
directory. Repo root becomes a polyglot index with src/ (React),
src-tauri/ (Rust), and jvm/ (JVM). Cuts the root from 8 Gradle-related
entries down to 1.
- Move gradlew, gradlew.bat, gradle.properties, gradle/ (wrapper +
version catalog), settings.gradle.kts, agent/, demo/ into jvm/
- Merge the previously-extracted :jvm subproject back into the root
Gradle project (jvm/build.gradle.kts now IS the root project, with
:agent and :demo as its only subprojects)
- Reabsorb allprojects { group = "moe.sota" } from the deleted root
build.gradle.kts into jvm/build.gradle.kts (load-bearing for the
agent's Agent-Class manifest attribute)
- Drop include("jvm") from settings.gradle.kts (subproject merged in)
- Add **/jvm/** to vite.config.ts watch.ignored so Gradle compile
output doesn't trigger HMR re-bundles during a tauri dev session
Refs #35
Set the group + rootProject.name so they compose naturally into the
package paths, removing the hardcoded ".jvm." segment that lived in
the agent's Agent-Class manifest expression.
- group: moe.sota -> moe.sota.decompiler
- rootProject.name: "Decompiler" -> "jvm"
- Move agent and demo Java sources under .jvm. subpackage
(moe.sota.decompiler.jvm.agent and .demo) so the directory layout
matches the package
- Agent manifest expression is now a clean composition:
${project.group}.${rootProject.name.lowercase()}.${project.name}.Main
- Shadow jar artifact renames from decompiler-0.10.0.jar to
jvm-0.10.0.jar (acceptable: the jar is the JVM tier of a polyglot
app, not the user-facing product)
Refs #35
End-to-end wiring proving the Tauri shell can call into JVM code: React invokes a Tauri command, Rust loads the JVM service jar via j4rs, calls a static Java method, returns the string to the UI. - jvm: add Service.java with a static greet() method as the first callable entry point - jvm/build.gradle.kts: drop the project version (Tauri owns app versioning now); produces a stable jvm.jar artifact - src-tauri: add j4rs dependency, expose greet_from_jvm Tauri command that resolves jar via app.path().resource_dir() - src-tauri/build.rs: invoke `./gradlew :shadowJar` and declare rerun-if-changed on jvm/ so cargo rebuilds the resource when JVM sources change (production build correctness) - src-tauri/tauri.conf.json: bundle jvm.jar as a Tauri resource; bump window initial height to 650 with a 500x300 minimum - src/App.tsx: invoke greet_from_jvm on mount, render the result Refs #35
- .gitignore: ignore .vscode (per-user IDE config shouldn't be tracked) - package.json + bun.lock: bump react 19.1 -> 19.2, vite 7 -> 8, typescript 5.8 -> 6.0, plugin-react 4 -> 6 (latest stable)
Replaces the placeholder UI with a full-screen Monaco editor. Frontend now bundles Monaco directly (no CDN fetch at runtime) so the app keeps working offline and we can later tighten the CSP. - package.json: add @monaco-editor/react + monaco-editor - src/monaco.ts: configure @monaco-editor/react's loader to use the bundled monaco namespace; register the editor worker via Vite's ?worker syntax so workers ship with the bundle - src/main.tsx: import ./monaco before App so loader.config runs before any Editor mounts - src/App.tsx: render Monaco below a header showing the JVM greeting; read-only, no minimap, no context menu, suppressed loading text - src/App.css: strip the Tauri-template boilerplate; keep one rule to hide Monaco's "Cannot edit in read-only editor" banner Refs #35
Replaces the placeholder single-pane Monaco view with a proper two-pane layout (file tree on the left, editor on the right) styled with Tailwind v4 and themed to match the existing Swing app's Nord palette. - Add tailwindcss v4 + @tailwindcss/vite; convert App.tsx inline styles to Tailwind utility classes - Add react-resizable-panels for the resizable Group/Panel/Separator layout, react-arborist for the virtualized sidebar tree - Define custom Monaco theme (src/theme.json) ported from jvm/src/main/resources/themes/RSyntaxTheme.xml so the editor uses the same Nord colors the Swing app does (background #4c566a, keywords #d08770 bold, comments #81a1c1, strings #a3be8c, numbers and types #ebcb8b, annotations #b48ead, etc.) - Bump editor font size to 16 - Native-feel polish: user-select: none on body so UI chrome isn't selectable; document-level contextmenu listener (in a useEffect with cleanup) suppresses the browser right-click menu; transparent ::selection background hides any selection that does sneak through via Cmd+A or similar on non-Monaco content Refs #35
Adds the 16-color Nord palette as Tailwind utility classes via the v4 @theme directive in App.css. Replaces the placeholder zinc/blue classes that don't fit the theme: - Tree node hover: bg-zinc-800 -> bg-nord-2 - Tree expand arrow: text-zinc-500 -> text-nord-9 (frost blue) - Separator: bg-zinc-700 / hover bg-blue-500 -> bg-nord-2 / hover bg-nord-12 (aurora orange, matches editor accent) - Body background -> nord-1, foreground -> nord-6, matching the Swing app's window colors (@background, @Foreground in the old FlatLaf.properties) Refs #35
Adds a Decompiler app menu with About + Quit on macOS, populated via PredefinedMenuItem::about with AboutMetadata. The about panel uses the native NSAboutPanel — no custom window needed. - short_version intentionally set to "" so macOS doesn't render the parenthesized "(X)" build identifier alongside the main version (without it the panel reads "Version X (X)" for projects that don't differentiate marketing version from build number) - credits field carries just the GitHub URL; macOS auto-renders it as a clickable link in the credits area - Cross-platform-only metadata (authors, comments, license, website, website_label) left None — macOS's panel doesn't render slots for them, they're meaningful on GTK only Refs #35
Continues the version line from where the Swing app left off so existing users see this as a continuation rather than a fresh 0.1.0 project. Also fills in the Tauri scaffolding placeholders. - src-tauri/Cargo.toml: version 0.1.0 -> 0.10.0; description + authors filled in (was "A Tauri App" / "you") - src-tauri/tauri.conf.json: bundle version matches Cargo
23 tasks
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Replace Service.java and the Kotlin Main.kt with a Java Main.java, update the Rust j4rs caller to invoke moe.sota.decompiler.jvm.Main, and stub ProcessService.start now that the Kotlin main it referenced is gone — that path was a Swing-only "new instance" feature.
Wire up tauri-plugin-cli with a positional `file` argument so the app can be launched against a JAR/WAR/ZIP from the command line.
Wire up org.beryx.runtime to produce a trimmed JRE under build/jre/, bundle it as a Tauri resource, and have the Rust side load libjvm directly via jni-rs's with_libjvm. Drops the j4rs dependency and its custom classloader. Also bump sourceCompatibility to Java 25 (the LTS that aligns with Kotlin 2.3.21's max jvmTarget).
Delete the kotlin packages (Application, controllers, menus, modules, views, kotlin services and types) and the java services and types tied to the swing flow. Strip the AWT icon machinery from BaseModel and the setIcon calls from its subclasses. Drop the matching deps (flatlaf, miglayout, rsyntaxtextarea, h2, koin, ktorm, kotlin) and trim the jlink module list to the bytecode-derived minimum. Net effect: bundled JRE drops from 51 MB to 31 MB, jvm.jar drops to 7 MB, source files drop from 46 to 10.
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.
No description provided.