Hi everyone, I have a KMM project with two modules...
# multiplatform
g
Hi everyone, I have a KMM project with two modules:
shared
and
payment
. I want to publish only the
shared
module as a Maven artifact and have the
payments
module included inside it so that when my consumer adds the
shared
dependency,
payments
is available too. Currently,
shared
depends on
payments
via
implementation(project(":shared:payments"))
in
commonMain
. When I publish just
shared
and use it in my consumer app, I get errors like:
Copy code
Could not find ProjectName.shared:payments:unspecified.
is there a way to package
payments
inside
shared
, so only one artifact needs to be published?
h
It is called shading and you can use shadow: https://github.com/GradleUp/shadow But why do you want to shade it anyway? Maven/Gradle downloads the payment artifact automatically.
g
Thanks for the suggestion. The reason I’m looking to bundle
payments
inside
shared
is because
payments
is an internal module. I don’t want to publish it separately as a standalone artifact.