Hello. I'm following the newest guide of setting u...
# javascript
g
Hello. I'm following the newest guide of setting up a Kotlin/JS project with Gradle (https://kotlinlang.org/docs/reference/js-project-setup.html) but I can't seem to import any gradle dependencies in the main.kt file (unresolved reference). Specifically, the JSoup Java library. I can see all the classes of the library in the External Libraries folder in the IDE. I tried importing the same library as a gradle dependency in a Kotlin/JVM project and it works flawlessly. Does anyone have a clue what might be going on?
s
Hi! If you’re targeting Kotlin/JS, you won’t be able to use Java libraries. Libraries available are Kotlin Multiplatform Libraries and NPM Packages.
👍 1
g
Thanks! Also, do multiplatform library suspend functions automatically compile to non-blocking js code?
i
Looks not. Coroutine has its own way to implement it.