Monday Jul 16, 2012

More Serious Attempt at a NetBeans Gradle Plugin

After a few small skirmishes in this area, here's a more serious attack:

What you see above is that a Gradle build file can be expanded, exposing its tasks, which can be double-clicked to be invoked. Also, the JAR dependencies of the project are visualized and can be browsed just like any other JAR file in NetBeans. When a change is made in the file, the task hierarchy and the dependency hierarchy are automatically rebuilt.

Any folder that has a file named 'build.gradle', on the highest level within the folder, is recognized as a Gradle project and can be opened:

All of the features above are then automatically available. There's also a file template for creating a new Gradle build file from scratch, for an existing project that doesn't yet have Gradle support. 

The final step, at least for this version of the plugin that provides basic Gradle support, is to work with the class path. I'll need to look at how this is done for the Grails project type, as well as, maybe the Maven project type. Not only the Java classes in 'src' should be on the classpath, but also the Java classes in the JARs retrieved via the declared dependencies.

The sources are here, anyone is free to do whatever they want with them:


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.


« July 2012 »