How to setup compose desktop hot reload

how-to-setup-compose-desktop-hot-reload

Steps:

  • Use Kotlin 2.1.20-RC (or any higher if released)
  • Apply the plugin
  • Wrap the content of a window with DevelopmentEntryPoint {}
  • Use OptimizeNonSkippingGroups (optional, but a better experience for me).
  • Then in a KMP project and IntelliJ, just using main function run gutter to run the APP.
  • If you’re using Kotlin JVM or Android Studio, then configure the jvmRun task or provide
  • ./gradlew jvmRun -DmainClass=path.toMain.MainKt

Basically, running compose apps is the easiest if using KMP + IntelliJ.

Note: Must use JVM that is shipped with Intellj. Navigate to Settings > Gradle > JDK and make sure IntelliJ JDK is selected

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
developing-energy-efficient-ai-models-for-sustainability

Developing Energy-Efficient AI Models for Sustainability

Next Post
building-real-time-trading-analytics:-a-step-by-step-guide-with-solace-pubsub+-and-risingwave

Building Real-Time Trading Analytics: A Step-by-Step Guide with Solace PubSub+ and RisingWave

Related Posts
rustup-が-“error:-linker-`cc`-not-found”-で失敗-–-alpine-linux-317-(rust-1.66)

rustup が “error: linker `cc` not found” で失敗 – Alpine Linux 3.17 (Rust 1.66)

はじめに Alpine Linux では Rustup が パッケージ として提供されています。Rust もあります。 Docker で Alpine Linux 上に Rust の開発環境を構築しました。 そしてその過程においてですが、以下のようなエラーが発生しました。cargo プロジェクトを試験的に動かした時のことです:…
Read More