I'm working on a KMM project that also has a modul...
# multiplatform
c
I'm working on a KMM project that also has a module for a backend KTOR server. However, trying to add a dependency on the shared module the same way I did for the android module isn't working. I add
implementation(project(":shared"))
in the build.gradle.kts in my server module, but I get the error
:server:main: Could not resolve project :shared.
when building. I'm assuming this is an issue with source set naming that resolves correctly for android and ios but not my server? Could use some help if anyone else also includes a server in their kmm project
I suppose it might make more sense to create something like a
client-common
module instead to hold basic data classes that can be shared between the server and various clients (including mobile). The KMM
shared
module is really just for KMM targets like android and ios
j
The shared code has JVM target I assume?
c
Thanks for the example - looks like adding the
jvm()
for the target in shared build.gradle.kts is the key