On 25/04/2012, at 5:39 AM, Alexander Kitaev wrote: > Hello, > > I'm migrating our build plugin from milestone-3 to rc-1. Our build plugin > was patching Eclipse .project and .classpath generating code by modifying > GenerateEclipseClasspath and GenerateEclipseProject tasks. > > Now, I'd like to modify EclipseProject and EclipseClasspath objects > properties. The question is how to get these objects from the build plugin? > I could locate "eclipse" task, but it does not contain "classpath" and > "project" properties. > > How could I get those objects (EclipseProject and EclipseClasspath) > programmatically?
Everything is reachable from the 'eclipse' extension added by the Eclipse plugin: http://gradle.org/docs/current/dsl/org.gradle.api.Project.html#N107EA So, you can do something like: def eclipseProject = project.eclipse.project or, from Java: EclipseProject eclipseProject = project.getExtensions.getByType(EclipseModel.class).getProject(); > > Thanks! > > -- > View this message in context: > http://gradle.1045684.n5.nabble.com/Obtaining-EclipseProject-and-EclipseClasspath-objects-tp5663105p5663105.html > Sent from the gradle-user mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > -- Adam Murdoch Gradle Co-founder http://www.gradle.org VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting http://www.gradleware.com