:wave: I am wondering how transitive dependencies ...
# multiplatform
m
👋 I am wondering how transitive dependencies work in kmp, been some time since I visited KMP and my knowledge is a little rusty and couldn't find any hints here on channel. I have a
shared
module which loads a
commonMain
dependency on pure kotlin
domain
module. In the iOS apps, the
shared
classes are visible, but
domain
ones are not. I tried both
api
and
implementation
dependency attaching.
🙌 1
I think we found it. It seems that transitive modules need to be explicitly exported in the final ios binary, just using
api
is not enough.
Copy code
binaries {
    framework {
        export(project(":domain"))
    }
}
I wonder if this would also work, but didn't check
Copy code
binaries {
    framework {
        transitiveExport = true
    }
}
🙌 1