Sharing code between jvm and js modules


are there plans to share kotlin code between jvm and javascript modules? for now i can see no obvious means to do this in intellij (short of copying kt files into some generated-sources directory)


I have attempted this but it’s not yet working very seamless and it was done with some nasty Gradle hacks. There is shared code between Android/JVM/JavaScript.

You can take a look here:


This is an interesting approach. I have gone for the copy the source to a gen folder approach after finding that intellij really doesn’t like modules sharing source folders (the original approach, just add the shared folder to the source path of the javascript module).