Hi folks. If I already have kmp shared module in my project, and I want to create another module like
remoteApi
as one of my kmp shared module dependency (it will contain ktor library to do API call), should I choose
Java or Kotlin Library
or
Kotlin Multiplatform Shared Module
?
*The dependency structure will be like this
app
<
sharedModule
<
remoteApi
x
xoangon
08/07/2023, 7:17 AM
Please let anyone correct me here if I’m wrong, as I haven’t yet tried KMP myself.
AFAIK, you should have the
kotlin("multiplatform")
plugin and the target platforms specified in that module, but you wouldn’t have any platform specific code there
👍 1
j
Jacob Ras
08/07/2023, 7:29 AM
^ yeah. However you create it, make sure you end up with the Multiplatform plugin and go from there. I never use the UI to create modules (I do it manually since it's just one file to add + need to fix settings code formatting anyway), but I think the one you're looking for is the bottom "Kotlin Multiplatform shared module"
➕ 1
👍 1
s
SanjayKarki
08/07/2023, 8:46 AM
Well in my knowledge KMP is built to support and use only KOTLIN FOR SHARED MODULE so Single Code base for all