hi all I have a multi project build where Module A depends on Module B where the dependency is decl...
j
hi all I have a multi project build where Module A depends on Module B where the dependency is declared like
implementation(project(":module-b"))
. simple enough. I am publishing Module A to a repository (github packages in this case). but when I have some completely separate project depend on the published Module A, e.g.
implementation("com.mydomain:module-a:1.0.0")
, gradle complains it cannot find
com.mydomain:module-b:unspecified
in any repository. I don’t want to publish module-b because it’s really an internal implementation detail that just happens to be its own module. any idea how I can get it so the published module-a artifact includes module-b code in it?
v
The recommended answer is, don't do it. If you see the need to split your code into multiple projects, then simply publish all those. That's by far the easiest and cleanest solution.
If you insist on splitting the code but having one artifact, you probably need to shade this dependency in e.g. using the shadow plugin by John Engelman. If you insist on splitting the code but only having one artifact, you need to shade this dependency in, for example us
Besides that, the question is off-topic here. 😉
j
got it. fair enough