Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I built an open-source tool to edit Jetpack Compose on-device via AST mutations (No Gradle rebuilds)

说明与用途

ComposeBridge 通过 AST 变更实现设备端 Jetpack Compose UI 编辑,提供可视化差异和 OTA Gradle 构建,加速开发流程。

问题

Android developers face a slow iteration loop in Jetpack Compose: Live Edit is volatile and full Gradle rebuilds are time‑consuming.

结果

ComposeBridge decouples UI tuning from the workstation, enabling permanent, compile‑ready source mutations from a device, with visual diff review and OTA Gradle builds, reducing iteration time from minutes to seconds.

工作流

  • 1. Connect device to host via encrypted tunnel.
  • 2. Adjust UI token or modifier on the device UI.
  • 3. ComposeBridge daemon receives delta and uses Tree‑sitter to parse Kotlin source.
  • 4. Daemon locates the Composable call site and mutates the source file on disk.
  • 5. Modified files are buffered and visual diffs are shown on the device.
  • 6. User accepts or rolls back changes via the phone UI.
  • 7. When ready, trigger a headless Gradle build remotely; progress streams to the phone.
  • 8. Compiled APK is pushed and installed OTA.

证据

ComposeBridge isn’t just an in‑memory preview swapper. It applies permanent, compile‑ready modifications:

来源

When you adjust a UI token or modifier on your physical device, the operational delta is sent back to your host machine over an encrypted tunnel.

来源

A headless background daemon uses Tree‑sitter to parse the Kotlin source tree, locate the exact Composable call site, and safely mutate the source file directly on disk.

来源

When you’re ready for a full run, trigger a headless Gradle build remotely. The progress is streamed back to your phone, and the compiled APK is pushed and installed over‑the‑air.

来源

  • 记录日期: 2026-10-26T06:11:21.061Z