We're looking at converting our Ant build to Gradle.
In regards to integration with Eclipse, we are looking for (conceptually) equivalent functionality for launching builds from the IDE. Eclipse provides a nice Ant view for invoking Ant targets.
There is an Eclipse plugin for launching Gradle builds (http://www.breskeby.com/downloads/gradle/eclipse/update/), but this seems to require users to jump through hoops to invoke different targets (edit the launch configuration, etc.).
How are others using Gradle from inside Eclipse?
From the main menu, select Run | Edit Configurations to open the run/debug configuration for your project. icon. In the list that opens, select Run Gradle task. In the Select Gradle Task dialog, specify the project and the task that you want to execute before launching the project.
In gradle tasks tab -> navigate to the project -> expand build folder -> right click on build -> Select Run Gradle tasks.
Buildship is an Eclipse plugin that allows you to build applications and libraries using Gradle through your IDE.
1 Answer. Show activity on this post. Select 'Help > About Eclipse' (on Macs this is 'Eclipse > About Eclipse'). Click the 'Installation Details' button to display the installation details dialog.
This is kind of an old post, but the SpringSource STS team has released a plugin: http://static.springsource.org/sts/docs/latest/reference/html/gradle/
Installation instructions can be found here: http://static.springsource.org/sts/docs/latest/reference/html/gradle/installation.html
My experience has been pretty positive with it so far. For straight-up Java projects it works quite well. I am having some issues generating correct war files through Eclipse, while using the Gradle plugin, but gradle itself does it wonderfully. I am relatively new to gradle and the plugin though, so it could be something that I am missing.
Interim work-around more palatable to those with command-line phobia.
From Eclipse, use pulldown menu Run / External Tools / External Tools Configurations...
Select "Program" in left navigator panel then click the "New launch configuration" button in the tool bar (first button in my tool bar).
With Main tab selected, fill out the following fields:
Add to Arguments: the switch "-b filename.gradle" if you use a Gradle build file other than "build.gradle".
After this, your developers can use the Run / External Tools or tool bar button to launch the Gradle Gui. They can do this and close it after each use, or (to avoid startup lag), minimize it when not in use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With