https://kotlinlang.org logo
#compose-web
Title
# compose-web
b

Brian G

06/10/2021, 5:47 PM
Is there a way to control which targets compose compiler runs for without splitting up my code into more modules?
I'm getting this error when I have a JS target that isn't using compose:
e: java.lang.IllegalStateException: Cannot find the Composer class in the classpath
o

Oleksandr Karpovich [JB]

06/10/2021, 6:50 PM
Hi Brian, I'll try to reproduce this tomorrow. I don't have the answer yet. What are the steps to reproduce this? To have a module A depending on B, where module A uses the compose plugin, but B doesn't?
b

Brian G

06/10/2021, 7:20 PM
I have a multiplatform project with Android, JVM, iOS, JS targets, but I only use Compose on Android & JVM. With 0.4.0 this works fine, but with 0.5.0-build222 it gives the above error unless I add implementation(compose.web.core) to the JS project.
o

Oleksandr Karpovich [JB]

06/10/2021, 8:02 PM
Oh, I see. You don't want to use compose in JS at all, right?
b

Brian G

06/11/2021, 6:14 PM
Exactly. (I want to, eventually, but right now Compose is incompatible with my project due to issues with kotlinx.serialization)
5 Views