Question about transitive dependencies built in kotlin multiplatform for ios:
We are looking to build a setup where we break out existing logic from our android and ios apps into specific modules that we will build as separate SDK’s.
Our current setup looks something like this:
Root project
- Module A
--src/Person.kt
--build.gradle.kts
- Module B
--src/PersonCounter.kt
--build.gradle.kts
Module A consists of a “Person” object that other modules will use. The object will also be used by external ios/android applications that will add Module A as a library.
Module B consists of business logic that will expose the Person through API’s to external ios/android applications that will add Module B as a library.
Module B accesses Module A in the gradle file by:
sourceSets {
...
implementation(projects.moduleA)
...
}
For our ios client we then build this as a XCFramework with ./gradlew
...assemble...ReleaseXCFramework and add both modules as libraries
Would it be possible for the ios client to then only hold one reference to the Person object?
Right now two different objects would get exposed, ModuleA.Person & ModuleB.ModuleAPerson which can not be used interchangeably.