Is there an option to include another modules in m...
# multiplatform
p
Is there an option to include another modules in my KMM shared module? I have a module called API, which contains a few kotlin classes that I would like to expose to the platforms, but I need to keep them in a separate module (as they are used by KSP for processing). I thought about adding second KMM module, but I run into weird problems (could not compile iOS part of the project as Android Studio was unable to find Xcode command line tools, but from my first KMM module it worked just fine). I found a workaround of copying the classes to commonMain of my shared module, which works, but don't like the prospect to have the file duplicates in the project. Is there a better way how to add module content into a KMM module?
👀 1
a
Although I am not experienced KMM dev, but I would like to put my two cents here. My understanding is that shared module is compiled into a framework that is accessible by iOS platform. Now if you want to create another KMM module, and want it accessible, I think you would need to somehow include it's source code in original shared framework (I don't know how), OR compile code of that module into another framework and link it in Xcode. You can check this article for some direction.
If anyone knows a better approach, please share!