How does Gradle Eclipse plugin figure constructs as below
compileJava.dependsOn xjc
Gradle-Eclipse plugin doesn't really do anything special with Gradle constructs. You'd be able to open Gradle Tasks view and run your 'xjc' or 'compileJava' task. You can also add your 'compileJava' or any other project to tasks to run after import in the Gradle Import wizard and have this task running every time Gradle project is refreshed (right-click on the project -> Gradle -> Refresh All). Whenever you build the project in Eclipse with JDT the compileJava task is not running if that is what you are asking... you'd have to start it up manually somehow.