Oracle Blog

Random NetBeans Stuff

Gradle in NetBeans (Part 2)

So, the NetBeans/Gradle team has expanded over night by 1/3, now also including Robert Novotny. He provided the dependency resolution code, as well as the code for some nice templates (one for Java SE and one for Java EE), while Martin provided the code for calling Gradle tasks and for accessing the output, which is now integrated into the Output window. My part is mainly to handle the NetBeans IDE integration, which currently looks as follows:

As you can see, the tasks provided by the plugins referenced in the Gradle build file (in this case, not only "java", but also "war" and "jetty") are available and can be run by double-clicking on their node. In addition, the dependencies declared in the Gradle file are displayed in a dedicated node, after they have been downloaded. When a change is made in the Gradle file, the file is reparsed and the nodes are recreated (pretty quickly, only a 2 or 3 second delay). All this is made possible by the Gradle Tooling API, which Martin and Robert have a pretty good understanding of (though oddly one of the most useful classes in the Gradle Tooling API is named EclipseProject, which is now well integrated into the NetBeans plugin), so the team work is great.

About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.