https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

Slackbot

02/26/2024, 3:57 AM
This message was deleted.
🧵 1
p

Pablichjenkov

02/26/2024, 4:46 AM
Check this examples https://github.com/Kotlin/kotlin-wasm-examples Also post what error you get
g

Giovanny Velez

02/26/2024, 5:00 AM
thank you @Pablichjenkov , I checked the repo but I don’t see what I need. The issue is that when I add:
Copy code
js {
        browser {
        }
        binaries.executable()

        generateTypeScriptDefinitions()
    }
It fails because it tries to include
commonMain
in the JS target, but as the project contains Compose Multiplatform, it fails because compose is not available for Kotlin/JS, which is ok. But I want to know how to ignore that or move the compose dependencies elsewhere to be included in the other targets except the Kotlin/JS one.
p

Pablichjenkov

02/26/2024, 5:48 AM
I would say, compare the .gradle files and see if there is anything different. I don't know if I understand your situation but compose-multiplatform is available in two variants of the browser,
compose-web
and
wasm
. There is
compose-html
which is not compatible with compose, not sure if that is the one you are using. But if you are using one of the 2 variants mentioned above. It should work out of the box
g

Giovanny Velez

02/26/2024, 6:24 AM
Sorry @Pablichjenkov I don’t get what you say, I’m not lost about what the issue is, and any of the examples you provided has a JS target. I’m not looking for Wasm or Compose Html
But I’m already solving it creating a module with only the Kotlin Multiplatform dependencies and it’s almost working, but it still needs a little more work. Thank you for your help 🙂
p

Pablichjenkov

02/26/2024, 8:32 AM
Sounds good
l

louiscad

02/26/2024, 10:15 AM
@Giovanny Velez Please EDIT your initial message to remove the long snippet, and put it in this thread instead.
2 Views