Multiplatform module dependency

Hi,

I’m new to Kotlin Multiplatform and I’m struggiling with setup of build environment.
I’m using InteliJ to create Multiplatform Lib.

Now I need in same project submodule which will be dependend of this “core” library.

I’m trying to figure out how to add this into gradle.build of submodule. But nothing works as expected.

val commonMain by getting {
dependencies {
implementation(project(":core_module"))
}
}

Is not working.

I’ve figured out one thing that works temporarely.
From InteliJ UI I can add dependency from Module Settings.
And it works fine until I do gradle sync.
After that dependency is removed.

This thing is suspicios: " Any changes made in its configuration may be lost after reimporting"

How to resolve this.

I didn’t had similar issues with regular Android Studio which is similar environment.

Basically I’m rewritting libraries from Kotlin to KotlinMultiplatform.

Any help or hint is appriciated.

Veljko