NetBeans Support for Gradle Multi-project Builds

The start of multi-project build support (described here) for the NetBeans Gradle plugin. For the projects that are part of the multi-project build, a separate project type is defined, which is registered in the lookup of the main Gradle project. Now each of the projects can be opened and worked on independently of the main project, in the same way as with suites/modules in NetBeans Platform development or the EJB modules in a NetBeans Java EE application project, for example.

Above, you see the Netflix Curator on GitHub, which Tim Boudreau suggested might be a good largish real world application for trying out the NetBeans plugin for Gradle.

As a consequence, I learned a lot about sub project type support in the NetBeans Platform. (Well, actually this is part of the APIs exposed by NetBeans IDE and not the NetBeans Platform.) Read about it here, which is where I documented it in the NetBeans Platform 7.2 Project Type tutorial:


I have a need for a custom project type that is mostly just a parent for existing NB project types for Java(Ant or Maven, soon Gradle) and C++. Think of it like a one project for a Java library that uses JNI and the project for the native library that implements the native methods that go with it. Add a little bit of metadata and some custom packaging steps (currently written with Gradle) and that would be my new project type.

Would making a new parent project type that has subprojects of existing NB project types be an easy thing to implement?

Posted by swpalmer on July 19, 2012 at 05:58 PM PDT #

Hi Geertjan,

I tried to load the Qi4j SDK which is a multi-modules Gradle project:
It has been quite long and cpu intensive.
I finally got the following exception:
The project show errors but no submodules:

Thanks a lot for the efforts you guys are putting in giving Netbeans a Gradle support.
Looking forward to first class Gradle support.



Posted by Paul on July 23, 2012 at 02:49 AM PDT #

Yes, there's no submodule support committed to the trunk of the NetBeans module yet. Cleaning that code up before committing it. So, no surprise you don't see submodules, because the NetBeans module doesn't support it yet.

Posted by Geertjan on July 23, 2012 at 03:33 AM PDT #

Okay that's fine.
Can't wait :-)

Posted by Paul on July 23, 2012 at 06:13 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

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 2016