https://kotlinlang.org logo
#gradle
Title
# gradle
t

Tech

01/28/2023, 9:09 PM
Hey, I was wondering how I would add two modules into the same publication? I have a module called
api
that implements things from the module
shared
however, when I publish
api
locally then it can't find
shared
even with shadow, The error is
Copy code
> Could not resolve all dependencies for configuration ':runtimeClasspath'.
   > Could not find io.github.tech:shared:0.0.1.
I have a module called
v

Vampire

01/28/2023, 11:53 PM
Just with some hackery. Usually you should just not do it. If you slit it to multiple modules, then publish them and all is fine.
t

Tech

01/29/2023, 3:06 PM
You recommend to just publish my shared module then import it?
v

Vampire

01/29/2023, 5:09 PM
Your api depends on shared already. So if you don't use classes from shared in the consumer then it is enough to depend on api, as that brings in shared automatically as dependency as you can see from your error.
t

Tech

01/29/2023, 5:10 PM
Alright thank you so much, I appreciate it.
7 Views