Hey, I’m creating a framework from a MPP project w...
# kotlin-native
r
Hey, I’m creating a framework from a MPP project with ktor as dependency, but the built
.h
doesn’t even seem to compile
Ok so the framework binary is sized at 55MB so I think I have some problems
I think that setting
transitiveExport = true
imports too much stuff... Do I really need to list all dependencies of the tree myself?
o
Nope, just not export transitively
r
Yes that’s what I’m starting to understand. I need to specify the specific arch I need, but it’s not a problem. I thought that not using transitive or not referencing each dependency would not include them at all, but it’s just another thing I don’t understand it seems
But then - what is
transitiveExport
used for?
o
to transitively export everything, if you surely know it's needed. In your case
-Xexport-library
may be better choise.
c
@olonho When I use this option, I receive a warning that says
Copy code
warning: following libraries are specified to be exported with -Xexport-library, but not included to the build:
IOSNearbyMessagesClient.kt
about one kotlin class I created. And then
P2P.kt:21:40: error: unresolved reference: IOSNearbyMessagesClient
r
export
is for dependencies, why are you specifying a class?
c
I am not
I am trying to export a MPP project as a framework, this MPP project has 2 Cinterop that are binding to 2 other ios framewrok, I have just added the
'-Xexport-library'
hopping to get one big framwork that I can import in an ios app
r
c
thanks I'll have a look
r
Sounds like what you’re doing is a combination of both gists (the gist I linked links to another one in the README.md)
s
@Cyrille QUÉMIN you are using
-Xexport-library
wrong. Consider using
export
directive instead: See “Exporting dependencies in frameworks” here: https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html
c
I will have a look thank you