Nikola Milovic
05/25/2021, 6:16 AMsourceSets {
named("commonMain") {
dependencies {
implementation(project(":common:utils"))
implementation(project(":common:database"))
implementation(project(":common:main"))
implementation(project(":common:edit"))
implementation(Deps.ArkIvanov.MVIKotlin.mvikotlin)
implementation(Deps.ArkIvanov.Decompose.decompose)
implementation(Deps.Badoo.Reaktive.reaktive)
}
}
}
sourceSets {
named("iosMain") {
dependencies {
api(project(":common:database"))
api(project(":common:main"))
api(project(":common:edit"))
}
}
From the Compose Todo sample app. Can someone explain to me why are we implementing the projects in the commonMain and then api them in the iosMain? Doesnt iosMain inherit from the commonMain? What do we achieve/ what's happening here?rnett
05/25/2021, 6:46 AMapi
and implementation
both add the dependency, api
just exposes it to other libs that depend on this one. I'm not sure why those dependencies are there at all, tbh, I would think they would be included from common. If there's another module that depends on iosMain
it may just to be to expose the dependencies.Nikola Milovic
05/25/2021, 7:35 AMJan M
05/26/2021, 2:57 PMNikola Milovic
05/26/2021, 3:12 PM