Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7897715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:14:19+00:00 2026-06-03T08:14:19+00:00

My project depends on library A in version n. It also depends on library

  • 0

My project depends on library A in version n.
It also depends on library B, which in turn depends on A in a version n-1.

When running gradle dependencies the tree shows my project and B both depending on A in version n.

However, when I run gradle idea I get a workspace with both version n and n-1 reported.

Can I do anything to circumvent it and have get a idea workspace that conforms to gradle’s dependeny resolution without forcing a version or changing the version I depend on?

I have already taken this to the Gradle list, but to no avail.

Update: I’ve uploaded a sample configuration, so you can experiment with it yourself. Note how Guava (A) appears in both version 10.0 and 11.0, thanks to both me and Reflections (B) depending on it.
From the example, I have learned that this only happens when the dependencies on A and B are spread across submodules.
Note: I know that Reflections 0.96 won’t work with Guava 11.0. It just was the first thing that came to mind.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:14:20+00:00Added an answer on June 3, 2026 at 8:14 am

    Just to be able to close this, here’s what Peter Niederwieser wrote:

    [This] is the expected behavior, not just for the IDEA plugin but for Gradle in general. This is because conflict resolution is currently done per configuration, not per build. When you execute gradle dependencies in Module1 and Module2, you’ll get the same results as for the IDEA modules.

    If both modules use Guava directly, you should specify direct dependencies, which solves the problem. Often this is done by factoring out the dependency declarations into a parent build script and referencing them by name from child scripts. (This is somewhat similar to Maven’s dependencyManagement section.) Forcing a version for all configurations is another solution. I expect that future versions of Gradle will support build-wide conflict resolution.

    Thanks for creating a sample project. This makes it so much easier to reproduce a problem. By the way, the best place to ask questions is http://forums.gradle.org.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Library project set up and a project which depends on this
I've a main project that depends on other Library projects that use external JARS
Suppose, I have an opensource project that depends on some library, that must be
I've developed a module for a Java project. The module depends on external library
I've got a project that depends on a particular version of MSVCR80.dll (the MS
I have an Android project that depends on an android library (apklib) project. The
I have a project which depends on several 3rd party libraries, the project itself
My project depends on a 3rd party library that only has snapshots in its
I have a project that depends on a library that is only easily available
I have a Java project, Parent , which depends on a Child sub-project (in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.