Sources of NetBeans Gradle Plugin

Here is where you can find the sources of the latest and greatest NetBeans Gradle plugin:

http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.1/misc/GradleSupport

To use it, download the sources above, open the sources into the IDE (which must be 7.1.1 or above), then you'll have a NetBeans module. Right-click it to run the module into a new instance of NetBeans IDE.

In the Options window's Miscellaneous tab, there's a Gradle subtab for setting the Gradle location. In the New File dialog, in the Other category, you'll find a template named "Empty Gradle file". Make sure to name it "build" and to put it in the root directory of the application (by leaving the Folder field empty, you're specifying it should be created in the root directory).

You'll then be able to expand the build.gradle file:

Double-click a task to run it. When you open the file, it opens in the Groovy editor, if the Groovy editor is installed. When you make changes in the file, the list of tasks, shown above, is automatically recreated.

It's at a really early stage of development and it would be great if developers out there would be interested in fixing its bugs and adding more features to it.

Comments:

Hi Geertjan,

I'm by no means an expert in "pure" NetBeans development, as you know; but I'm more than curious about Gradle (I do hate ant!)

I've checked out Gradle trunk, and did some "review tests", like this one:

public class GradleDataObject extends MultiDataObject {

private static final long serialVersionUID = -4161400787634198210L;
private transient final CookieSet cookieSet;
private final Lookup cokieLookUp;

public GradleDataObject(final FileObject fileObject, final MultiFileLoader loader) throws DataObjectExistsException, IOException {
super(fileObject, loader);
cookieSet = getCookieSet();
cookieSet.add((Node.Cookie) DataEditorSupport.create(GradleDataObject.this, getPrimaryEntry(), cookieSet));
cokieLookUp = cookieSet.getLookup();
cokieLookUp.lookup(DataEditorSupport.class).setMIMEType("text/x-groovy");
}

@Override
protected Node createNodeDelegate() {
return new DataNode(GradleDataObject.this, Children.create(new TaskChildFactory(GradleDataObject.this), true), cokieLookUp);
}
}

Nothing fancy!, but you may find it interesting :)

BTW, BuildableProject seems deprecated.

Cheers,
Carlos Hoces

Posted by guest on March 25, 2012 at 04:22 AM PDT #

That's good.

How about gradle support for Netbeans RCP applications?
Is there a place to track progress/see what's going on?

Posted by Tomasz Bartczak on March 25, 2012 at 07:06 PM PDT #

Here's everything I know about Gradle and NetBeans RCP:

https://blogs.oracle.com/geertjan/entry/gradle_for_netbeans_rcp

Posted by Geertjan on March 25, 2012 at 07:13 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
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.

Search

Archives
« March 2015
SunMonTueWedThuFriSat
4
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today