Not able to get the latest version of jar during gradle build

Hi everyone ,

We have a nested project structure where different versions of a same jar file is referred in different projects. But the highest version of the jar file is not used instead it downloads the jar file version referred in the last project that is being refreshed.

Is it an expected behavior?

Our project structure is like below.

Project X dependencies are:

ProjectB:version1 dependencies are

ProjectC:version1 dependencies are

While building ProjectX we always get the ProjectA:version1 instead of the specific version of ProjectA:version3 specified in the dependencies for ProjectX

Are we missing something here? Or is it the expected behavior

can someone please help us out in this? We are blocked with our release for this