I am trying to introduce DDD in kotlin multiplatform mobile project. I have created 2 modules:
infrastructure
that contains repositories, apis, responsesDTO, etc and
domain
that contains usecase interfaces and domain specific data classes.
I want ios and android client to know only
domain
, without any idea of
infrastructure
, so in the build.gradle of my
shared
I have:
api(project(":domain"))
implementation(project(":infrastructure"))
The issue I am facing: The ios client do not see any of domain classes if theses are not used in
shared
. Is there any way to force compilation of these? Android client sees all of these classes correctly and can make a use of them.