I don't user the Eclipse plugin right now because I don't like that it forces me to have an Eclipse project per Gradle subproject. I have my Gradle project split up into many tiny little libraries and it would be too hard to have them all as Eclipse projects. E.g. I might have a directory structure that looks something like:
java/com/benmccann
--- common
--- util |
— db |
--- dao |
|
|
— model |
---- frontend
---- backend
--- pipeline
Every leaf node is it's own Gradle project and many are dependent upon each other. This work great with Gradle. But it quickly becomes unwieldy within Eclipse if each must be its own Eclipse project with interdependencies. What works much better for me is to have a single Eclipse project with all the transitive dependencies on the classpath.
I've written the attached updateClasspath task, which updates the .classpath file assuming all Gradle subprojects live within a single Eclipse project. I'd like to contribute this to the Eclipse plugin. I think it'd be great if the Eclipse plugin could work in either mode by specifying an option.
|