Darshan Nair
01/11/2024, 12:10 PMandroidexpertmanish
01/11/2024, 12:15 PMkotlin {
// ...
sourceSets {
val commonMain by getting {
dependencies {
implementation(project(":your-android-module-name"))
}
}
// ...
}
}
Darshan Nair
01/11/2024, 12:18 PMMessias Junior
01/11/2024, 12:18 PMandroidexpertmanish
01/11/2024, 12:21 PMPablichjenkov
01/11/2024, 12:31 PMPablichjenkov
01/11/2024, 12:33 PMmkrussel
01/11/2024, 2:24 PMcommonMain
if it is supported for all the platforms being used.
So if your normal module is a JVM module, you can use it in commonMain
if you are only targeting jvm and android. If it is an android module then you can only use it in commonMain
if you are targeting just android. If your multiplatform module is targeting more platforms then you need the dependency to be in either jvmMain
or androidMain
source sets.