Is there a way how to exclude some classes during ...
# multiplatform
m
Is there a way how to exclude some classes during export to framework? For example with
Copy code
cocoapods {
...
  framework {
    export(project(":shared:foo"))
  }
...
}

sourceSets {
...
  api(project(":shared:foo"))
...
}
I will get sources for foo but I don't want some classes from foo to be exported. Why? Most classes from foo don't need to be exported/accesible from iOS side and build will be much faster. Thanks
m
You can use
HiddenFromObjC
on the class itself.
p
Or use the
internal
keyword. It depends on whether it needs to be visible to other Kotlin modules or not.
m
yeah, internal would be my first choice if possible
m
I have tried`internal`but it has many unwanted consequences for kotlin/android code and that was dead end. I have tried `HiddenFromObjC`on some classes and it seems to be working. Hopefully it will have right impact on build time when I will use it on all unwanted classes. Thank you for help.