No description
Find a file
2026-06-08 13:23:19 +05:30
.forgejo/workflows ci: merge android and desktop into one job to fix release asset overwrite 2026-04-30 04:01:20 +05:30
composeApp refactor: two-phase dashboard load and animate UI transitions 2026-06-08 13:23:19 +05:30
gradle fix android back button popping in-app stack; drop unused js/wasm/web targets 2026-05-06 14:45:33 +05:30
.gitignore feat: Initial commit 2026-04-25 18:48:42 +05:30
build.gradle.kts feat: Initial commit 2026-04-25 18:48:42 +05:30
gradle.properties feat: Initial commit 2026-04-25 18:48:42 +05:30
gradlew feat: Initial commit 2026-04-25 18:48:42 +05:30
gradlew.bat feat: Initial commit 2026-04-25 18:48:42 +05:30
README.md refactor: manager UI flow and state boundaries 2026-04-29 02:40:57 +05:30
settings.gradle.kts build: consume reseam sdk via maven, drop native-artifacts plugin, add ci 2026-04-30 01:55:32 +05:30

This is the Kotlin Multiplatform manager for Reseam.

composeApp/src/commonMain/kotlin/app/reseam/manager/patcher       JSON-facing patcher API models/core
composeApp/src/commonMain/kotlin/app/reseam/manager/domain        platform-neutral repository/source contracts
composeApp/src/commonMain/kotlin/app/reseam/manager/data          SQLDelight stores and shared data adapters
composeApp/src/commonMain/kotlin/app/reseam/manager/ui            Compose UI, theme, routing, and viewmodels
composeApp/src/androidMain/kotlin/app/reseam/manager/data         Android platform adapters
composeApp/src/jvmMain/kotlin/app/reseam/manager/data             desktop platform adapters

Mental Model

The app has four clear layers:

  1. ReseamManagerApp owns the app shell and route table. It should only wire screens to viewmodel actions.
  2. Viewmodels own UI state transitions. They should not render UI and should expose one obvious path for each user action.
  3. Domain interfaces describe the stable app concepts: bundles, patches, installed apps, settings, output paths, and installers.
  4. Platform/data adapters perform persistence, file picking, installation, and FFI calls. Android and desktop differences should stay here.

Patch creation is a three-step flow: Inputs -> Patches -> Run. Shared flow chrome lives in ui/components/PatchFlowScaffold.kt; screen files should focus on the content for their step.

The Android and desktop backends call the BoltFFI manager bindings generated by ../reseam/sdk.

Native Artifacts

Android packages two native libraries for every ABI:

libreseam_sdk.so
libreseam_patcher.so

libreseam_sdk.so backs the manager inspect/patch JSON API. libreseam_patcher.so backs AndroidPatchHost.setClassLoader(...), which is required before Android ART can load Kotlin patch classes.

Desktop builds and bundles the current host JNI library as a JVM resource:

native/<host>/libreseam_sdk_jni.so

On Linux x86_64, for example:

native/linux-x86_64/libreseam_sdk_jni.so

The generated Kotlin loader extracts that resource automatically at runtime.

The current development build reads prepared artifacts from a Reseam workspace. Set that workspace explicitly:

./gradlew :composeApp:assembleDebug -Preseam.workspace=../reseam

or:

RESEAM_WORKSPACE=/path/to/reseam ./gradlew :composeApp:assembleDebug

This is a development bridge. The production shape should be a published SDK artifact from git.reseam.app, not a manager build that clones or compiles the Reseam source tree. The package should contain:

generated Kotlin bindings
Android jniLibs
desktop native resources

Once that package exists, the manager should replace reseamNative source/resource dirs with normal Gradle dependencies.

Build Prerequisites

From ../reseam, generate the manager Android bindings and jniLibs:

cd ../reseam/sdk
boltffi pack android --release

Build Android patcher libraries for the Android targets:

cd ../..
cargo build -p reseam-patcher --release --target aarch64-linux-android
cargo build -p reseam-patcher --release --target armv7-linux-androideabi
cargo build -p reseam-patcher --release --target i686-linux-android
cargo build -p reseam-patcher --release --target x86_64-linux-android

The manager Gradle build copies and normalizes those native artifacts into composeApp/build/generated/reseamNative.

Build and Run Android Application

./gradlew :composeApp:assembleDebug

Build and Run Desktop (JVM) Application

./gradlew :composeApp:run

Build the desktop JVM jar:

./gradlew :composeApp:jvmJar

Verify both native packaging paths:

./gradlew :composeApp:assembleDebug :composeApp:jvmJar