Installation¶
Add the Monaka dependencies to your module's build.gradle.kts.
Core library¶
Required for all targets. Provides State, Action, Effect, Store, the store { } DSL,
stateMachine { }, StateMachineStore, plugins, and the relay/bridge API.
Compose integration¶
Provides the Compose Multiplatform helpers: rememberStore, toViewStore, handleEffects,
bindLifecycle, render, ViewStore, and RenderScope. Targets Android, iOS, and JVM.
Brings in :monaka transitively. See the Compose integration guide.
Test DSL¶
Provides testStore { } and the assertion DSL (expectState, expectEffect, trigger, …).
See the testing guide for usage.
KSP transition processor (optional)¶
Generates toXxx() / toSelf() extension functions from @Transition and @SelfTransition
annotations placed on your state types by the stub generator.
Android / JVM only:
plugins {
id("com.google.devtools.ksp")
}
dependencies {
ksp("dev.gmvalentino.monaka:monaka-transitions:<version>")
}
Kotlin Multiplatform: because state types live in commonMain, the setup requires a few
extra steps so the generated extensions are visible to all platform compilations. See the
KSP setup guide for the full configuration.
Gradle plugin (optional)¶
Adds three Gradle tasks for code generation from your state machine DSL. See the Gradle plugin section for full configuration.