[GRADLE-3410] Compile only dependency conflict handling Created: 04/Mar/16 Updated: 09/Dec/16 Resolved: 09/Dec/16 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 2.12 |
Fix Version/s: | None |
Type: | Bug | ||
Reporter: | Piotr Jagielski | Assignee: | Unassigned |
Resolution: | Duplicate | Votes: | 0 |
Description |
The problematic behaviour affects only the mapping to IDEA or Eclipse. When Gradle builds stuff, it works fine. Given: dependencies { compileOnly 'foo:bar:x' compile 'foo:bar:y' }Then: When x <= y, the mapping to the IDE is fine (version y is selected and included once) When x > y, the mapping to the IDE includes both versions in the project's classpath. The classpath for consuming projects is fine. Keep in mind that these conflicts might be dragged in transitively. As a point of reference, let's take a look at how the mapping behaves with conflicts in other places: Given: dependencies { compile 'foo:bar:x' runtime 'foo:bar:y' }Then: When x >= y, the mapping is fine. When x < y, the mapping to the IDE includes both versions in the project's classpath. The classpath for consuming projects is fine. You can replace (compile, runtime) with a bunch of other combinations, such as (compile, testCompile) or (compile, testRuntime) or (testCompile, testRuntime). This behaviour has been there since time began (more or less). The symptoms that we're seeing here are from the same cause, namely that we merge dependency graphs into IDE classpath buckets using the identity of the resolved files, rather than the identity of the library. |
Comments |
Comment by Benjamin Muschko [ 15/Nov/16 ] |
As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub. We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to. Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:
We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle! |
Comment by Eric Wendelin [ 09/Dec/16 ] |