Ketoy 0.4.16-alpha is here
We're shipping 0.4.16-alpha, the release that turns KBC screens from
static layouts into real, interactive, idiomatic Kotlin. You write
ordinary Compose (typed ViewModels, var state, reusable components,
forEach loops, a full Canvas drawing surface) and it compiles to a
signed .ktx bundle that renders natively on device. No new mental
model, no server round-trips for state changes.
Coordinates
dependencies {
implementation(platform("dev.ketoy.vm:ketoy-bom:0.4.16-alpha"))
implementation("dev.ketoy.vm:ketoy-runtime")
implementation("dev.ketoy.vm:ketoy-hilt") // optional
implementation("dev.ketoy.vm:ketoy-adapters-material3")
}Drop-in upgrade from 0.3.x. Everything below is additive; nothing in existing screens changes.
What landed
- Typed ViewModels. Write an idiomatic
@KetoyViewModelwith a realStateFlow, consume it withketoyViewModel<T>(), and read it withcollectAsState(). The VM survives recomposition and config change and is cleared with the screen. Constructor-injected repository interfaces reach Room, Ktor, and Retrofit through the capability bridge. - Local Compose state.
var count by remember { mutableStateOf(0) }, the typed factories (mutableIntStateOf,mutableFloatStateOf, ...), andrememberSaveableall compile. - Reusable
@KetoyComposablecomponents. Extract a helper composable and call it with callbacks, content slots,data classparams, and lists. This is the primary way to keep KBC screens DRY. - List iteration.
items.forEach { ... }andforEachIndexedemit a composable per item, over literal lists or lists returned by a host capability. - Canvas / DrawScope. A full sandboxed drawing surface: shapes,
paths, gradients, transforms, and text through
rememberTextMeasurer(). - Layout additions.
verticalScroll/horizontalScroll,Arrangement.spacedBy, per-cornerRoundedCornerShape,HorizontalDivider/VerticalDivider, andthemeColor("name")for light and dark mode from one bundle.
Read the feature guides
Every feature ships with a how-to. Start with
ViewModels, State & Business Logic,
then the new
Reusable components and
Canvas & drawing guides.
Local state, forEach, and the layout additions are covered in
Compose UI & state.
Compose-version decoupling
Adapter parameters are now encoded by name in the catalog's index space, not by position in the consumer's Compose signature. A newer Compose version that inserts or reorders a component parameter no longer shifts your bundle's arguments. You get this for free; nothing to configure.