DEV Community

ColtonIdle
ColtonIdle

Posted on

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

Top comments (0)

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay