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