[GRADLE-1066] Provide support for declaring repositories on a per-artifact basis Created: 28/Jul/10  Updated: 08/Feb/17  Resolved: 08/Feb/17

Status: Resolved
Project: Gradle
Affects Version/s: 0.9
Fix Version/s: None

Type: New Feature
Reporter: Chris Beams Assignee: Unassigned
Resolution: Duplicate Votes: 20


 Description   

Hans mentioned this is already planned for 1.0 M1, but putting an issue in just to track it.

Often a repository will be added to a gradle configuration to resolve just one artifact in the build. It would be nice to specify that repository inline with the dependency that needs it. This adds clarity for everyone involved, and should shorten build times because Ivy will not have to query that repository for every other dependency.



 Comments   
Comment by Chris Beams [ 13/Mar/11 ]

This is important with regard to the discussion Hans and I had about plugins (and declaring which repository a plugin jar comes from)

Comment by Justin Ryan [ 01/Jan/13 ]

Further discussion was had on the forum: http://forums.gradle.org/gradle/topics/force_dependency_to_be_resolved_against_a_specific_set_of_repository

I also struggle with mixing dependencies with repositories. We're forced to deal with this because it's common for plugins to create their own configuration and add their dependencies (e.g. findbugs plugin), which forces me to either mirror their dependencies in my internal repo or expose Maven Central for all dependencies. For our scenario, exposing Maven Central is a no-go, so we end up manually adding dependencies to our internal repo as plugins use them. Of course the don't ever document these and I have to deal with all their transitive dependencies too. Just isolating configurations to certain repositories would solve the problem for me.

Comment by Benjamin Walther [ 26/May/16 ]

Bumping this: is there any plan to support this in future versions, or does a workaround exist?

Comment by Oleg Alexeyev [ 12/Oct/16 ]

Just ran into a problem with maven trying to find a snapshot dependency supposed to be built locally from a snapshot repo, which is configured to take some other snapshot artifacts - I really want to be specific when I configure a snapshot repo!

Then I hoped to find the answer in Gradle - but alas, not yet!

This feature could be yet another nice differentiator of Gradle from Maven. Please consider it.

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:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 08/Feb/17 ]

The issue is now available on GitHub: https://github.com/gradle/gradle/issues/1369

Generated at Wed Jun 30 11:46:01 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.