Gradle Classpath Support in NetBeans
By Geertjan-Oracle on Jul 17, 2012
This may be my greatest achievement as a NetBeans Platform programmer, ever. Since my girlfriend is not a programmer, she's not going to be able to join with me in celebrating this happy news. (Well, she can celebrate, but without full appreciation.)
So I turn to the on-line community of developers everywhere: I've created a Gradle project type for NetBeans IDE, with classpath support. That means that not only the JDK, but also the dependencies declared in the Gradle build file are on the classpath of the project:
The JARs in the Libraries node above are defined in the Gradle build file, refer to the screenshot in yesterday's blog entry for details. Those JARs are put on the classpath, thanks to the NetBeans plugin, and can then be coded against, as you can see above.
Still a lot needs to be done before this is usable. Changes in the Gradle build file need to be reflected in the hierarchies in the explorer view; the user should be able to map Gradle tasks to project commands; the user should be able to change the JDK; and many other similar project-level features need to be implemented, while it would also be cool to have the Package View support integrated into this project type.
But, for now, this is a great step forward. It would be great to have a few people out there who'd like to try out this early (and also later) version of the plugin, but bear in mind that only very few features work. Well, you can run all your tasks and the classpath works, so that's all the basic stuff ready to be used by anyone using Gradle.
A small cool thing I like is the fact that the project node hierarchy is pluggable. So, you could create an external module and provide a new node in the project view above, but more about that another time.
Many thanks to the Grails project (which owes some gratitude to the Ruby project, among others), which is where almost all of the Gradle classpath code comes from.