I’ve been using Gradle and Buildship for a while, but there is one thing that I have never completely understood:
Where is the line between the the functionality of Buildship and the functionality in the Gradle eclipe task?
For example: most of the time, importing a Gradle project into Eclipse works like a dream. That’s absolutely brilliant - Buildship makes me an Eclipse project that is perfect.
But I have some projects which generate source-code using Jaxb, so I might have a task called genJaxb.
The project will not compile unless Jaxb has created the classes and the output directory is a source folder, so I make the eclipse task depend on the genJaxb task.
apply plugin: 'eclipse' tasks.eclipse.dependsOn genJaxb
./gradlew cleanEclipse eclipse and the project is good to go.
When I clone that project from git and import it into Eclipse, the imported project has not executed the genJaxb task - I use the
Gradle Tasks view to run the
eclipse task and do a
Gradle -> Refresh Gradle Project.
That seems a little counter intuitive - Buildship made me the Eclipse project, and now I’m telling the Gradle eclipse plugin to make me an Eclipse project too.
I have become accustomed to this - but colleagues are incandescent with rage for me making their lives so complicated…
I’m not trying to criticise - because Buildship is doing a brilliant job keeping me in Eclipse, helping me stay focussed and without need to switch to the command line. Most of the time Buildship does a brilliant job of making me an Eclipse project that mimics the Gradle configuration. I’m just wondering where the line is between it and the Gradle eclipse plugin.
Thanks for your help.