- Kotlin 100%
| .forgejo/workflows | ||
| composeApp | ||
| gradle | ||
| .gitignore | ||
| build.gradle.kts | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| README.md | ||
| settings.gradle.kts | ||
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:
ReseamManagerAppowns the app shell and route table. It should only wire screens to viewmodel actions.- Viewmodels own UI state transitions. They should not render UI and should expose one obvious path for each user action.
- Domain interfaces describe the stable app concepts: bundles, patches, installed apps, settings, output paths, and installers.
- 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