# multiplatform

Marcin Bak

09/29/2020, 9:20 PM
When I right click on kotlin source folder in commonMain there is no
action to create a package (which is there for jvmMain). Is there no packages concept in KMP or is it an issue with the IntelliJ?
Here’s for jvmMain

Shawn Witte

09/29/2020, 9:25 PM
To my knowledge, a package in JVM is just a directory. So the new directory option in common is equivalent to the new package option in jvm.
Perhaps the Kotlin common code doesn't enforce that the declared package of a file matches the directory structure? That would explain the difference, but I'm just guessing.

Marcin Bak

09/29/2020, 9:39 PM
True, it is just a directory, serving as namespaces for your code. The nice thing with creating package vs creating directory is that with package you can define for example “” and IDE creates the underlying folder structure for you. When creating directory in commonMain I have to manually do this for each folder 😕

Big Chungus

09/29/2020, 9:42 PM
You can create nested directories too com/playground/app/xyz will achieve the same result as new package
👍 2
I mean with new directory option


09/30/2020, 4:14 AM
Thanks for that Martynas - I never knew that. I’ve been creating individual directories manually like a chump for 2 years in common modules.
👍 1