[GRADLE-155] global exclude of transitive deps Created: 11/Jul/08  Updated: 04/Jan/13  Resolved: 19/Aug/08

Status: Resolved
Project: Gradle
Affects Version/s: 0.2
Fix Version/s: 0.3

Type: New Feature
Reporter: jaco Assignee: Hans Dockter
Resolution: Fixed Votes: 0

Attachments: Text File initial GRADLE-155 work.patch    

 Description   

Add support for Ivy's global excludes of transitive dependencies.

https://issues.apache.org/jira/browse/IVY-431



 Comments   
Comment by Antony Stubbs [ 13/Jul/08 ]

I thought I'd randomly choose an issue and take a crack at it.
I've started trying to understand Gradle's internals but it's slow progress. As I think I understand things, I have tried to add some JavaDoc cough, cough along the way if I'm resonably confident it's accurate....

I've never tried to debug such a complex / large Groovy/Java project, and the Groovy code by it's dynamic nature is much harder to debug.

Is there any internal architecture documentation anywhere by any chance?

From what I can tell so far, I need to add a ExcludeRule to the Ivy system. I am trying to track down the point of interface between Gradle and Ivy but it's proving to be a little elusive. I've found:

DefaultGradleArtifact#createIvyArtifact
new DefaultArtifact(moduleRevisionId, null, baseName, groups.extension, groups.extension, extraAttributes)

but I haven't figured out yet why you don't hold onto a reference of it.
Care to point me in the right direction?

I've attached the stuff I've done so far, as well as doing a little refactoring in Main.main.

I'm pretty keen to nail this, so I will keep working on it...

Comment by Hans Dockter [ 13/Jul/08 ]

You have chosen one of the hardest parts to get into. Ivy is pretty complex and we have a layer on top of this. Without waning to spoil your fun in getting into this The ModuleDescriptorConverter is the place to have a look at. It corresponds to an ivy file (ivy.xml). The global excludes apply to all dependencies.

The global exclude statement would be a top level dependencies directive:

dependencies {
   exclude ...
}

In the ModuleDescriptorConverter you can call from the created Ivy moduleDescriptor the method addExcludeRule. Have a look at the ModuleDependency where we offer excludes for a single dependency.

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