# Managing transitive dependency versions

**URL:** <https://discuss.gradle.org/t/managing-transitive-dependency-versions/29348>\
**Category:** Help/Discuss\
**Created:** [November 2, 2018, 9:44pm UTC](https://discuss.gradle.org/t/managing-transitive-dependency-versions/29348 "2018-11-02T21:44:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![amp](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@amp](https://discuss.gradle.org/u/amp)\
**Post date:** [November 2, 2018, 9:44pm UTC](https://discuss.gradle.org/t/managing-transitive-dependency-versions/29348/1 "2018-11-02T21:44:02Z")

</div>

I have 3 gradle projects: Project-1, Project-2, Project-3. Project-1 and Project-2 are Java libraries, Project-3 is a consumer of these libraries. Both Project-1 and Project-2 have a dependency on Module-A. However, for every one of them I want to be able to specify a list of exact versions that they are compatible with. For example, Project-1 is compatible and tested with Module-A, versions 1 and 2, but Project-2 is compatible with Module-A, versions 2 and 3. I want to be able to specify these requirements in the build configuration of each project. These dependencies can be impelementation only or even compileOnly.

When Project-3 consumes libraries built by Project-1 and Project-2, I want to make sure that Module-A is resolved to the latest version that is explicitly listed in both Project-1 and Project-2. Otherwise, I would like to get an error at the build step, that no satisfying dependency resolution can be found. Ideally, I would like to be able to explicitly specify version of Module-A in Project-3 Gradle build and receive an error if it’s not compatible with any of Project-1 or Project-2.

Project-1 and Project-2 artifacts are consumed from and uploaded to a local Maven repository using Maven plugin.
