The JetBrains Blog

Compose Multiplatform 1.12.0 Released

8.5内容质量
Compose Multiplatform 1.12.0 Released

TL;DR · AI 摘要

Compose Multiplatform 1.12.0 引入 AI 代理支持、自动字体回退和窗口 API 改进,提升跨平台开发效率与兼容性。

核心要点

  • MCP 服务器使 AI 代理可直接与运行中的应用交互,实现自动重载验证
  • 网页端自动下载 Noto 字体子集,支持日文/阿拉伯语等复杂文字渲染
  • 窗口 API v2 提供屏幕选择、内容自适应尺寸等精细控制能力

结构提纲

按章节快速跳转。

  1. 介绍 Compose Multiplatform 1.12.0 的主要更新方向

  2. MCP 服务器实现 AI 代理与应用的实时交互验证

  3. 自动下载 Noto 字体子集解决字符缺失问题

  4. v2 API 提供更精细的窗口位置/尺寸控制方案

思维导图

用一张图看清主题之间的关系。

查看大纲文本(无障碍 / 无 JS 友好)
  • Compose Multiplatform 1.12.0
    • AI 集成
      • MCP 服务器协议
      • 热重载验证
    • 字体管理
      • Noto 字体自动下载
      • 多语言支持
    • 窗口控制
      • v2 API
      • 异步状态管理

金句 / Highlights

值得收藏与分享的关键句。

#Kotlin#Compose Multiplatform#AI#跨平台开发
打开原文

Compose Multiplatform 1.12.0 Released - The JetBrains Blog

Kotlin

A concise multiplatform language developed by JetBrains

Follow

  • Follow:
  • X X
  • RSS RSS

Visit the Kotlin Site

Multiplatform

Releases

Compose Multiplatform 1.12.0 Released

Elvira Mustafina

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 .

Try Compose Hot Reload

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 :

code
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:

code
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 .

Compose for Desktop

Compose for Web

Compose Hot Reload

MCP

  • Share
  • Facebook
  • Twitter
  • Linkedin

Prev post

Signatures, be true: domain errors and functional handling in Kotlin