Kotlin #
A concise multiplatform language developed by JetBrains
Compose Multiplatform 1.12.0 is out! This version brings new tooling for AI assistants, improvements to web resource management, and finer control over desktop window states.
Here are the highlights of this release:
- MCP server for AI agents in Compose Hot Reload
- Automatic font fallback for web
- v2 version of the window and dialog API for desktop
For a complete overview of the changes, check out What’s new in Compose Multiplatform 1.12.0 or the release notes on GitHub.
Get Started with Compose Multiplatform
MCP server for AI agents in Compose Hot Reload #
Compose Hot Reload now ships with an experimental Model Context Protocol (MCP) server that connects AI coding agents to your running application.
Using the MCP server, an agent can trigger reloads, take screenshots, inspect the semantic tree, simulate clicks and text input, and read application logs. In practice, this means the agent can verify the results of its own edits. It can confirm that the reload succeeded, inspect the rendered UI, catch a runtime exception, and iterate – all without you describing what’s on screen.
For the full list of available tools and instructions on connecting your agent, see the Compose Hot Reload documentation.
Automatic font fallback for web #
Compose Multiplatform for web now handles characters that your application’s fonts don’t cover. When it encounters an unresolved character during rendering, it downloads the matching Noto font subset on demand and recomposes the affected text. As a result, Japanese, Arabic, Devanagari, and emoji render correctly without you having to bundle fonts for them.
Window and dialog v2 #
This release introduces an experimental v2 API for WindowState
and DialogState
in the androidx.compose.ui.window.v2
package. It gives you finer control over how windows and dialogs are positioned and sized. You can:
- Select the screen a window appears on.
- Provide custom positioning and sizing logic, including logic based on the content’s intrinsic size.
- Set minimum and maximum window sizes.
- Position dialogs relative to their parent window.
The v2 API also makes the asynchronous nature of window state changes explicit: It distinguishes the state you request from the state the window currently has.
For example, to center a window and give it a fixed size, use WindowPositionProvider
and WindowSizeProvider
:
val windowState = rememberWindowState(
initialBoundsProvider = WindowBoundsProvider(
positionProvider = WindowPositionProvider.CenteredOnScreen,
sizeProvider = WindowSizeProvider.Fixed(DpSize(400.dp, 200.dp))
)
)
With the v2 API, you can also use WindowSizeProvider.Unconstrained
to size the window to its content initially, while still letting that content expand with fillMaxSize()
when the user enlarges the window:
WindowBoundsProvider(
positionProvider = WindowPositionProvider.CenteredOnScreen,
sizeProvider = WindowSizeProvider.Unconstrained
)
See the Window and dialog v2 documentation for the full details.
Update your dependencies, try out the new APIs, and let us know what you think about Compose Multiplatform 1.12.0.
For everything that didn’t make it into this post, check out the full release notes or What’s new.