I want to share something, it's not a bug, but rat...
# multiplatform
d
I want to share something, it's not a bug, but rather a wrong expectation, continue in thread..
because I'm not a very Gradle professional I had in my shared module these dependencies:
Copy code
commonMain.dependencies {
    implementation(libs.kotlinx.coroutines.core)

    implementation(libs.kotlinx.rpc.core)
    implementation(libs.kotlinx.serialization.core)
    implementation(libs.kotlinx.serialization.json)

    implementation(libs.ktor.client.core)
    implementation(libs.ktor.client.content.negotiation)
    implementation(libs.ktor.serialization.kotlinx.json)

    implementation(libs.oidc)
    implementation(libs.oidc.ktor)

    implementation(project.dependencies.platform(libs.koin.bom))
    implementation(libs.koin.core)
    implementation(project.dependencies.platform(libs.koin.annotations.bom))
    implementation(libs.koin.annotations)
}
and I expected if I put this in my compose module:
Copy code
commonMain.dependencies {
    implementation(projects.shared)  <---- Import shared module
    //...compose impl
}
Then I will get automatically in the compose module - all implementation/dependencies from the shared module too.. But only the API of the shared module will be imported, not the dependencies - unless used by your shared module code
c
Instead of
implementation
you can use
api
to make the transitive dependencies from a project visible to the importing project. Also for grade related question it would be better to ask in #C19FD9681
Better approach though would be to create a convention plugin. https://docs.gradle.org/current/samples/sample_convention_plugins.html
d
Thanks @Chrimaeon, did not know about this info