Closed dragossusi closed 3 years ago
Hi! Is your project available at GitHub or somewhere?
Hello, it is private, but I can add you to it, let me push the changes.
I have sent you an invite
Hi @dragossusi
do you use org.jetbrains.compose.foundation:foundation
in the common source set?
foundation
and some other modules are not ported to be used in kotlin/js.
here is a list of dependencies that can be used with js:
compose.web.core
compose.web.widgets
compose.runtime
I also see that you are using Serialization plugin together with Compose plugin and they are not compatible at the moment. Workaround is to use them in separate modules.
Hi @dragossusi do you use
org.jetbrains.compose.foundation:foundation
in the common source set?
foundation
and some other modules are not ported to be used in kotlin/js.here is a list of dependencies that can be used with js:
compose.web.core compose.web.widgets compose.runtime
I am using these:
api(compose.runtime)
api(compose.foundation)
api(compose.material)
api(compose.ui)
I see. It's not possible to use foundation, material, ui
in kotlin/js.
I think you need to move these dependencies to jvmMain source set so android and desktop depend on it.
And in kotlin/js you will need to implement ui
using compose.web.core
and/or compose.web.widgets
.
@eymar would it be easy to do this myself(contributing to this repository)?
@dragossusi what exactly do you want to contribute here?
@akurasov Porting foundation, material and ui to kotlin/js
@dragossusi You might find this thread interesting - https://kotlinlang.slack.com/archives/C01F2HV7868/p1627583669021500 Porting those to kotlin/js won't be easy, although it should be doable.
material, foundation and ui are not in compose-jb repo. They're in androidx project or its fork here - https://github.com/JetBrains/androidx
@dragossusi do you have any other questions regarding this topic?
@akurasov no, we can close this issue
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
What I'm trying to do
I have a gradle module called
ui
which has the code for the screen for android/desktop/web. I am also using Kodein for DI. I can't get the web to work, if I comment these lines, everything works.Version
Config
Error
No matching variant of org.jetbrains.compose.foundation:foundation:0.5.0-build262 was found. The consumer was configured to find a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js', attribute 'org.jetbrains.kotlin.js.compiler' with value 'ir' but: