Did anyone have problems with `src/main/kotlin` no...
# javascript
c
Did anyone have problems with
src/main/kotlin
not being marked as source folder in IntelliJ when using Gradle?
Copy code
plugins {
    id("kotlin2js")
}

dependencies {
    compile(kotlin("stdlib-js"))
}
g
No, no problem. To be sure to have everything properly set the first time, use the “new project” menu in intellij idea, selecting gradle + kotlin.js. Everything is working in few seconds (maybe more if gradle needs to dowload stuff).
c
@gaetan Reloading a few times helped, but I still have a problem with compiling sources from another subproject. I want to use a multi-project setup, where one of the modules is common between server and JS, but I can't get JS one to compile the shared sources.
I believe this would be the solution in Gradle/Groovy:
Copy code
sourceSets {
  main.kotlin.srcDirs += project(':shared').sourceSets.main.kotlin.srcDirs
}
But I'm having trouble translating the code.
g
Ok, then it’s more a multiplatform settings. You are not using the correct plugin (kotlin2js). It’s kotlin-platform-js. All information is here: https://kotlinlang.org/docs/reference/multiplatform.html Again, try to generate a blank project from idea.