Forced to add compose runtime to jvmMain when using compose + ktor
See original GitHub issueThe compileKotlinJvm
task fails with:
androidx.compose.compiler.plugins.kotlin.IncompatibleComposeRuntimeVersionException: The Compose Compiler requires the Compose Runtime to be on the class path, but none could be found. The compose compiler plugin you are using (version 1.1.0-beta01) expects a minimum runtime version of 1.0.0.
Unless I add implementation(compose.runtime)
to jvmMain.dependencies
But this feels weird since I’m only using compose for the js target.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Compose Runtime - Android Developers
Fundamental components of compose UI needed to interact with the device, including layout, drawing, and input. Declaring dependencies. To add a dependency on ......
Read more >Kotlin Multiplatform by Tutorials, Chapter 5: Developing UI
This adds the repository for the Compose Multiplatform library. Open the shared build.gradle.kts file and add the following after kotlin -> android():.
Read more >WhatsNew 2.0 | Ktor Framework
i upload my ktor project to heroku server and succeffly upload and it work only for simple request put when it go inside...
Read more >Jetpack Compose: Displaying data in compose using MVVM
State import androidx.compose.runtime. ... IO).launch { /* _posts.value is used now due to the datatype change */ _posts.value = KtorClient.
Read more >Compose for Desktop: Milestone 4 Released | The Kotlin Blog
More desktop UI goodies are coming your way! Milestone 4, the latest version of Compose for Desktop, comes packed with features to help...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue is that you have single module project and this module contains both server and Js code. You use Compose plugin in this module, so it is used for all sourceSets. Compose plugin forces usage of Compose Compiler plugin, that checks compose runtime presence. So your build scripts uses Compose for server side.
I would suggest to separate Server and JS code into separate modules.
There is no such at the moment, but probably we should create one.