Gradle multi-module dependency relationship

Hi
I have below structure for my repositories:
uses kotlin gradle 6.9,

on my first project:

proj1.root → root project contains share functions for both children
proj1.child1
proj1.child2

each module has its own version as they are getting updates every some time.

my second project (proj2) is flat (only root), but uses function from the proj1.root and child1.
now I need to create another dependency with the 2nd child as well.
when I added it to my dependency on proj2 (as I did for the 1st child)
with dependency order:
proj1.root (v1.0.1)
proj1.child1 (v1.0.5)
proj1.child2 (v1.0.9)

and I used some method that exist on child2 i got runtime exception - methodNotExist
, but when I changed the dependency order to be:
proj1.root (v1.0.1)
proj1.child2 (v1.0.9)
proj1.child1 (v1.0.5)

I got the missing method on child2, but now i’m missing the functions that exist on child1.

how can I manage that properly?

I try to increment all versions for all modules, but still had this issue.

From your description it is - at least to me - very unclear what you do concretely and why it fails.
Could you maybe provide an MCVE?