[GRADLE-644] exported=true on lib and src classpath entries Created: 18/Sep/09  Updated: 04/Jan/13  Resolved: 24/Nov/10

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

Type: Improvement
Reporter: Philip Crotwell Assignee: Hans Dockter
Resolution: Fixed Votes: 1

Attachments: Text File 0001-exported-true-on-lib-and-src-classpath-entries.patch    

 Description   

Especially when working with mulitprojects, the dependency lib and src entries should be exported="true" so that dependent projects will build.



 Comments   
Comment by René Gröschke (Inactive) [ 23/Feb/10 ]

In your patch you always set the "EXPORTED" attribute true. I'm not sure if this is good practice. In my custom builds I added some methods to a extended eclipse plugin to support the following syntax:

....
defaultExport = false

dependencies {
compile("commons-logging:commons-logging:1.1"){
export

{ true }

}
}
...

What do you think about this syntax? I would like to have something like this:

dependencies {
compile("commons-logging:commons-logging:1.1")

{ export true }

}

but I failed to support this syntax by just adding code to the plugin and without changing the dependencyhandler.

any thoughts? I would like to share my additions to the eclipse plugin if desired.

regards,
René

Comment by Hans Dockter [ 17/Apr/10 ]

@Rene It is now possible to add a syntax like the one you would like. For a little snippet on how you could make use of that in the Eclipse plugin, see: http://pastebin.com/8kP2FiFq

Comment by René Gröschke (Inactive) [ 27/Apr/10 ]

Hi there, I've added basic support for the export feature at http://github.com/breskeby/gradle/tree/GRADLE-644 will add some documentation and maybe some more tests before sending a pull request. bye bye

Comment by Hans Dockter [ 28/Apr/10 ]

@Rene Excellent

Comment by René Gröschke (Inactive) [ 05/May/10 ]

Hi there, I've just send a pull request to you with a patch. I added some stuff to the userguide too. I'm not that happy with the implementation I used to allow configuration wide export configuration in the EclipseClasspath. I would like check for exporting before calling "addDependsOnProjects()" and "addLibs()" from createXmlDocument(). But somehow that doesn't work because of some groovy foo on getClasspathLibs(). the patch is hosted at http://github.com/breskeby/gradle/tree/GRADLE-644
regards,
René

Comment by Philip Crotwell [ 27/Jul/10 ]

I appears the additions to the userguide and the samples (eclipse-export-usage and eclipse-export-bulk) did not make it into trunk. Can they be added as well, otherwise it is hard to know how to use this.

thanks,
Philip

Comment by Hans Dockter [ 27/Jul/10 ]

This will come soon.

Comment by Hans Dockter [ 02/Aug/10 ]

There is now an updated version of the user's guide. Fine grained settings regarding the export can be done via they whenConfigured hook.

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