[GRADLE-28] Add tasks for generating Eclipse files Created: 09/Apr/08 Updated: 04/Jan/13 Resolved: 28/Aug/08 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 0.1 |
Fix Version/s: | 0.4 |
Type: | New Feature | ||
Reporter: | Hans Dockter | Assignee: | Hans Dockter |
Resolution: | Fixed | Votes: | 2 |
Attachments: | EclipsePlugin_1.groovy EclipsePlugin_2.groovy | ||||||||||||
Issue Links: |
|
Comments |
Comment by Pieter Smit [ 17/Jul/08 ] |
I created a closure to update my eclipse .classpath file to reflect the current dependencies. Maybe this can help: Closure updateClasspath = { task -> ant.copy(file:eclipseClasspathFile, tofile:eclipseClasspathFile.toString() + ".old", overwrite:true) def classpathXml = new XmlParser().parseText(eclipseClasspathFile.text) def currentEclipseLibs = classpathXml.classpathentry.findAll { it.'@kind'.equals('lib') }currentEclipseLibs.each { classpathXml.remove (it) }
task.project.dependencies.resolve('compile') //vs runtime } fileWriter = task.project.file('.classpath') |
Comment by Phil Messenger [ 15/Aug/08 ] |
A more comprehensive version of an eclipse plugin |
Comment by Phil Messenger [ 15/Aug/08 ] |
The file I've just attached takes the code submitted by Pieter Smit above and adds some additional features:
|
Comment by Hans Dockter [ 18/Aug/08 ] |
Hi Phil, I've just returned from my holidays. I'm very much looking forwards to looking at your contribution very soon. |
Comment by Phil Messenger [ 18/Aug/08 ] |
Hi Hans, this is an updated version of the plugin with a few bug fixes. It's worth noting that at the moment this plugin doesn't generate the Eclipse ".project" file. Couple of things to note
FWIW, I find the warResourceMappings map useful when actually generating a war: warResourceMappings = ["src/conf" : "WEB-INF"] archive_war { warResourceMappings.each { mapEntry -> zipFileSet( dir: project.file(mapEntry.key), prefix: mapEntry.value ) } } |
Comment by Hans Dockter [ 28/Aug/08 ] |
We submitted tasks for generating Eclipse files. I'm therefore closing this general issue. For the further work we will work with more fine grained issues. I have created a eclipse component for Jira which is supposed to be assigned to Eclipse related issues. |