Gradle Support - plugin detail

Allows opening of Gradle projects

NetBeans Plugin - Gradle Support
Plugin owner: attila.kelemen
Website: https://github.com/kelemen/netbeans-gradle-project
Added: 2012-09-01
License: LGPLv3
Category: Building
Downloaded: 6,298 times
Rating:
 4.41, by 8 users

Plugin Log Show log

Versions available

Download plugin   Download size: 2.29 MB   Last Update: 2014-03-01

This plugin is also available on the NetBeans Plugin Portal Update Center. Use 'Tools > Plugins' action from the NetBeans IDE main menu for convenient installation of this plugin


What's new in this version

1.3.0

First released version for NetBeans 8.0.

Verifications for NetBeans versions

8.0 verification PASSED See verification details
Download plugin   Download size: 2.29 MB   Last Update: 2014-03-01

This plugin is also available on the NetBeans Plugin Portal Update Center. Use 'Tools > Plugins' action from the NetBeans IDE main menu for convenient installation of this plugin


What's new in this version

1.2.9 -> 1.3.0

  • The model (source sets, dependencies, etc.) of a project is remembered between NetBeans sessions. The model is automatically refreshed (in the background) upon first project load but if you did not change anything relevant, you can start working without waiting for the slow project loading.
  • Run/Debug focused test method is now supported. This feature requires Gradle 1.10 or newer.
  • Running tests in custom source sets is now supported. This feature relies on some heuristic: It is expected that the source set name is the same as the associated test task (an undefined heuristic is used to find mapping between source sets and test tasks when there is no exact match).
  • The Test Results window of NetBeans is now used when explicitly running tests.
  • It is now possible to delete empty source roots from the project's context menu: "Source roots/Delete empty source roots".
  • Custom test tasks are now listed in the project's context menu under "Custom Tests".
  • It is now possible to refresh the project node. This is useful when the source roots have changed externally.
  • Task options (such as "--tests") can now be specified in the task list of custom commands.
  • Fixed a bug when the path to the temporary directory contained a non-ascii character on Windows. Issue #122.
  • Fixed a bug when the "Repeat build" command was used to re-run debug tasks.
  • Fixed a bug of the new project wizard when deleting the last used folder. Bug 240632.
  • Using Gradle 1.11 when there is no information what Gradle version is to be used.
  • API improvement: Added various new features for extensions when they run Gradle commands.

1.2.8 -> 1.2.9

  • Fixed a bug when parsing some projects (IllegalAccessException: Issue #101).
  • Major improvement in error reporting: NetBeans will now distinguish between various problem and report them accordingly to the user. For example, it can distinguish between build script errors, dependency resolution failures, unexpected errors (probably bugs).
  • Dependency resolution failure of a project will no longer fail the loading of each project in the multi-project build. Rather, if the dependencies of a project cannot be loaded, only that project will be affected (and even this project will "only" miss the dependencies).
  • Balloons are displayed for problems instead of output tabs and message boxes.
  • Repeat Build/Run (Ctrl-F11) is now supported (Issue #109).
  • Fixed temporary directory handling in multi user environment (Issue #111).
  • Projects like a typical root project no longer has an empty dependencies node.
  • No longer load projects just because their root folder is shown in the favorits window (Issue #25).
  • No longer load projects when they are selected (but not opened) in the open project dialog.
  • "Failed to download sources" is no longer shown on success.
  • Run is no longer enabled on projects like a typical root project.
  • Test is now enabled again on all projects (if you are using NBAndroid note that the test task will be "test" except for Android subprojects).
  • The default Gradle version is now 1.10.
  • When NetBeans evaluates a project for determining the project layout (etc.), it will set the project property "evaluatingIDE" to "NetBeans". Note, this is not done when executing tasks from NetBeans, only for loading models.
  • New API to extend the plugin.

1.2.6 -> 1.2.8

  • Major change: The "idea" plugin is no longer used when using Gradle 1.9 or above. It is still possible to revert to using the "idea" plugin based API by configuring so in the global settings)
  • The last set profile is now used when restarting NetBeans.
  • Source files next to a binary are now detected if they have the "-sources.zip" prefix instead of ".jar".
  • Apply code changes is now fixed (broken since 1.2.3).
  • Fixed Run file / Debug file when "skip tests" is checked in the global settings.
  • Improved caption of output tabs for custom tasks.
  • The output tab now has two buttons: "Rerun" and "Rerun with different args".
  • The project wizard dialog now looks more like other project wizards.
  • Using Gradle 1.9 as a fallback.
  • Warning dialog when Gradle 1.8 is used (Issue #74).
  • Fixed localization issue in the GUI designer (Issue #88).
  • It is now possible to generate missing source root folders (project's context menu: "Create source roots").
  • Fixed source detection of third party libraries when using Gradle 1.9.
  • It is now possible to extend the API via the ProjectServiceProvider annotation (it is however recommended to use the extension API).


Verifications for NetBeans versions

7.4 verification PASSED See verification details
Download plugin   Download size: 2.29 MB   Last Update: 2014-03-01

This plugin is also available on the NetBeans Plugin Portal Update Center. Use 'Tools > Plugins' action from the NetBeans IDE main menu for convenient installation of this plugin


What's new in this version

1.2.9 -> 1.3.0

  • The model (source sets, dependencies, etc.) of a project is remembered between NetBeans sessions. The model is automatically refreshed (in the background) upon first project load but if you did not change anything relevant, you can start working without waiting for the slow project loading.
  • Run/Debug focused test method is now supported. This feature requires Gradle 1.10 or newer.
  • Running tests in custom source sets is now supported. This feature relies on some heuristic: It is expected that the source set name is the same as the associated test task (an undefined heuristic is used to find mapping between source sets and test tasks when there is no exact match).
  • The Test Results window of NetBeans is now used when explicitly running tests.
  • It is now possible to delete empty source roots from the project's context menu: "Source roots/Delete empty source roots".
  • Custom test tasks are now listed in the project's context menu under "Custom Tests".
  • It is now possible to refresh the project node. This is useful when the source roots have changed externally.
  • Task options (such as "--tests") can now be specified in the task list of custom commands.
  • Fixed a bug when the path to the temporary directory contained a non-ascii character on Windows. Issue #122.
  • Fixed a bug when the "Repeat build" command was used to re-run debug tasks.
  • Fixed a bug of the new project wizard when deleting the last used folder. Bug 240632.
  • Using Gradle 1.11 when there is no information what Gradle version is to be used.
  • API improvement: Added various new features for extensions when they run Gradle commands.

1.2.8 -> 1.2.9

  • Fixed a bug when parsing some projects (IllegalAccessException: Issue #101).
  • Major improvement in error reporting: NetBeans will now distinguish between various problem and report them accordingly to the user. For example, it can distinguish between build script errors, dependency resolution failures, unexpected errors (probably bugs).
  • Dependency resolution failure of a project will no longer fail the loading of each project in the multi-project build. Rather, if the dependencies of a project cannot be loaded, only that project will be affected (and even this project will "only" miss the dependencies).
  • Balloons are displayed for problems instead of output tabs and message boxes.
  • Repeat Build/Run (Ctrl-F11) is now supported (Issue #109).
  • Fixed temporary directory handling in multi user environment (Issue #111).
  • Projects like a typical root project no longer has an empty dependencies node.
  • No longer load projects just because their root folder is shown in the favorits window (Issue #25).
  • No longer load projects when they are selected (but not opened) in the open project dialog.
  • "Failed to download sources" is no longer shown on success.
  • Run is no longer enabled on projects like a typical root project.
  • Test is now enabled again on all projects (if you are using NBAndroid note that the test task will be "test" except for Android subprojects).
  • The default Gradle version is now 1.10.
  • When NetBeans evaluates a project for determining the project layout (etc.), it will set the project property "evaluatingIDE" to "NetBeans". Note, this is not done when executing tasks from NetBeans, only for loading models.
  • New API to extend the plugin.

1.2.6 -> 1.2.8

  • Major change: The "idea" plugin is no longer used when using Gradle 1.9 or above. It is still possible to revert to using the "idea" plugin based API by configuring so in the global settings)
  • The last set profile is now used when restarting NetBeans.
  • Source files next to a binary are now detected if they have the "-sources.zip" prefix instead of ".jar".
  • Apply code changes is now fixed (broken since 1.2.3).
  • Fixed Run file / Debug file when "skip tests" is checked in the global settings.
  • Improved caption of output tabs for custom tasks.
  • The output tab now has two buttons: "Rerun" and "Rerun with different args".
  • The project wizard dialog now looks more like other project wizards.
  • Using Gradle 1.9 as a fallback.
  • Warning dialog when Gradle 1.8 is used (Issue #74).
  • Fixed localization issue in the GUI designer (Issue #88).
  • It is now possible to generate missing source root folders (project's context menu: "Create source roots").
  • Fixed source detection of third party libraries when using Gradle 1.9.
  • It is now possible to extend the API via the ProjectServiceProvider annotation (it is however recommended to use the extension API).

1.2.5 -> 1.2.6

  • Gradle 1.7 is now the default when no version is specified (neither in the project properties nor in the global settings).
  • Fixed a bug where fully qualified tasks might not always found. This matters only if "tasks must exist" is checked.
  • The tasks in custom Gradle commands are now detected properly even if a custom task variable containing space character is used.
  • Fixed a bug where the plugin sometimes failed to use the Gradle version set in the project properties.
  • Fixed a problem when converting printed stack traces to links to the source code.
  • If you use "[directory-name].gradle" instead of the default "build.gradle", it is treated the same way as "build.gradle" everywhere.

1.2.4 -> 1.2.5

  • Fixed a long standing issue where the source nodes were not displayed in some rare cases.

1.2.2 -> 1.2.4

  • Added a public API to allow other projects to extend the functionality of the plugin. The first plugin which is integrated is NBAndroid. Note however, that the new API is only usable for projects using Gradle 1.6 or later. Also, the support is rather experimental for every participant (This plugin, NBAndroid, Android build system and Gradle itself).
  • NetBeans classpath scanning should no longer interfere with the clean task.
  • Custom task variables can now be defined in the custom tasks dialog. These variables will be requested from the user in a pop-up dialog before executing the task. See the wiki page (Custom Task Variables) for details about this new feature.
  • Fixed a possible issue with refactoring across multiple opened projects (In previous releases, it was possible, that some opened projects were not considered for refactoring).
  • Regression: Issue #25 is reintroduced as a side effect of providing a public API.

1.2.1 -> 1.2.2

  • Fixed a possible dead-lock when refactoring (Bug 228494 and Issue #37)
  • The display name of the project is now the one specified in the build script (only after the project has been loaded).

1.2.0 -> 1.2.1

  • Integration with the Change Line Endings on Save plugin
  • Improved detecting files on the output tab.
  • buildSrc is now recognized as part of the Gradle project. Note that you may need some manual tunning in the build script, if you want classpaths to be correctly recognized by NetBeans.
  • Automatically distinguishing source folders if you have more folders with the same type (e.g.: resource, test).
  • Added the possiblity to set formatting rules for the project in the project properties.
  • Apply Code Changes should now work as it works in the Maven plugin.
  • Predefined template file list is now supplied by the plugin.
  • It is now possible to define a license template file which is to be automatically added to files created by NetBeans.
  • Browsing for Gradle home now sets the text field instead of the button :)

1.2.0

First released version for NetBeans 7.3.

Verifications for NetBeans versions

7.3 verification PASSED See verification details
Download plugin   Download size: 2.29 MB   Last Update: 2014-03-01

This plugin is also available on the NetBeans Plugin Portal Update Center. Use 'Tools > Plugins' action from the NetBeans IDE main menu for convenient installation of this plugin


What's new in this version

1.2.9 -> 1.3.0

  • The model (source sets, dependencies, etc.) of a project is remembered between NetBeans sessions. The model is automatically refreshed (in the background) upon first project load but if you did not change anything relevant, you can start working without waiting for the slow project loading.
  • Run/Debug focused test method is now supported. This feature requires Gradle 1.10 or newer.
  • Running tests in custom source sets is now supported. This feature relies on some heuristic: It is expected that the source set name is the same as the associated test task (an undefined heuristic is used to find mapping between source sets and test tasks when there is no exact match).
  • The Test Results window of NetBeans is now used when explicitly running tests.
  • It is now possible to delete empty source roots from the project's context menu: "Source roots/Delete empty source roots".
  • Custom test tasks are now listed in the project's context menu under "Custom Tests".
  • It is now possible to refresh the project node. This is useful when the source roots have changed externally.
  • Task options (such as "--tests") can now be specified in the task list of custom commands.
  • Fixed a bug when the path to the temporary directory contained a non-ascii character on Windows. Issue #122.
  • Fixed a bug when the "Repeat build" command was used to re-run debug tasks.
  • Fixed a bug of the new project wizard when deleting the last used folder. Bug 240632.
  • Using Gradle 1.11 when there is no information what Gradle version is to be used.
  • API improvement: Added various new features for extensions when they run Gradle commands.

1.2.8 -> 1.2.9

  • Fixed a bug when parsing some projects (IllegalAccessException: Issue #101).
  • Major improvement in error reporting: NetBeans will now distinguish between various problem and report them accordingly to the user. For example, it can distinguish between build script errors, dependency resolution failures, unexpected errors (probably bugs).
  • Dependency resolution failure of a project will no longer fail the loading of each project in the multi-project build. Rather, if the dependencies of a project cannot be loaded, only that project will be affected (and even this project will "only" miss the dependencies).
  • Balloons are displayed for problems instead of output tabs and message boxes.
  • Repeat Build/Run (Ctrl-F11) is now supported (Issue #109).
  • Fixed temporary directory handling in multi user environment (Issue #111).
  • Projects like a typical root project no longer has an empty dependencies node.
  • No longer load projects just because their root folder is shown in the favorits window (Issue #25).
  • No longer load projects when they are selected (but not opened) in the open project dialog.
  • "Failed to download sources" is no longer shown on success.
  • Run is no longer enabled on projects like a typical root project.
  • Test is now enabled again on all projects (if you are using NBAndroid note that the test task will be "test" except for Android subprojects).
  • The default Gradle version is now 1.10.
  • When NetBeans evaluates a project for determining the project layout (etc.), it will set the project property "evaluatingIDE" to "NetBeans". Note, this is not done when executing tasks from NetBeans, only for loading models.
  • New API to extend the plugin.

1.2.6 -> 1.2.8

  • Major change: The "idea" plugin is no longer used when using Gradle 1.9 or above. It is still possible to revert to using the "idea" plugin based API by configuring so in the global settings)
  • The last set profile is now used when restarting NetBeans.
  • Source files next to a binary are now detected if they have the "-sources.zip" prefix instead of ".jar".
  • Apply code changes is now fixed (broken since 1.2.3).
  • Fixed Run file / Debug file when "skip tests" is checked in the global settings.
  • Improved caption of output tabs for custom tasks.
  • The output tab now has two buttons: "Rerun" and "Rerun with different args".
  • The project wizard dialog now looks more like other project wizards.
  • Using Gradle 1.9 as a fallback.
  • Warning dialog when Gradle 1.8 is used (Issue #74).
  • Fixed localization issue in the GUI designer (Issue #88).
  • It is now possible to generate missing source root folders (project's context menu: "Create source roots").
  • Fixed source detection of third party libraries when using Gradle 1.9.
  • It is now possible to extend the API via the ProjectServiceProvider annotation (it is however recommended to use the extension API).

1.2.5 -> 1.2.6

  • Gradle 1.7 is now the default when no version is specified (neither in the project properties nor in the global settings).
  • Fixed a bug where fully qualified tasks might not always found. This matters only if "tasks must exist" is checked.
  • The tasks in custom Gradle commands are now detected properly even if a custom task variable containing space character is used.
  • Fixed a bug where the plugin sometimes failed to use the Gradle version set in the project properties.
  • Fixed a problem when converting printed stack traces to links to the source code.
  • If you use "[directory-name].gradle" instead of the default "build.gradle", it is treated the same way as "build.gradle" everywhere.

1.2.4 -> 1.2.5

  • Fixed a long standing issue where the source nodes were not displayed in some rare cases.

1.2.2 -> 1.2.4

  • Added a public API to allow other projects to extend the functionality of the plugin. The first plugin which is integrated is NBAndroid. Note however, that the new API is only usable for projects using Gradle 1.6 or later. Also, the support is rather experimental for every participant (This plugin, NBAndroid, Android build system and Gradle itself).
  • NetBeans classpath scanning should no longer interfere with the clean task.
  • Custom task variables can now be defined in the custom tasks dialog. These variables will be requested from the user in a pop-up dialog before executing the task. See the wiki page (Custom Task Variables) for details about this new feature.
  • Fixed a possible issue with refactoring across multiple opened projects (In previous releases, it was possible, that some opened projects were not considered for refactoring).
  • Regression: Issue #25 is reintroduced as a side effect of providing a public API.

1.2.1 -> 1.2.2

  • Fixed a possible dead-lock when refactoring (Bug 228494 and Issue #37)
  • The display name of the project is now the one specified in the build script (only after the project has been loaded).

1.2.0 -> 1.2.1

  • Integration with the Change Line Endings on Save plugin
  • Improved detecting files on the output tab.
  • buildSrc is now recognized as part of the Gradle project. Note that you may need some manual tunning in the build script, if you want classpaths to be correctly recognized by NetBeans.
  • Automatically distinguishing source folders if you have more folders with the same type (e.g.: resource, test).
  • Added the possiblity to set formatting rules for the project in the project properties.
  • Apply Code Changes should now work as it works in the Maven plugin.
  • Predefined template file list is now supplied by the plugin.
  • It is now possible to define a license template file which is to be automatically added to files created by NetBeans.
  • Browsing for Gradle home now sets the text field instead of the button :)

1.1.9 -> 1.2.0

  • Fixed a bug which might prevent the Gradle home project property from being saved.
  • Refactoring should now work properly for multi level Gradle projects.
  • Project can now be deleted from NetBeans (simply deletes the project folder).
  • It is now possible to rely on the sourceCompatibility/targetCompatiblity set in the build script (this feature must be allowed in the global settings).
  • Better integration with the FindBugs plugin
  • Root projects are marked with "[root]" in the project view.
  • gradle.properties is now displayed in the "Build Scripts" node.

1.1.8 -> 1.1.9

  • Where you can specify the installation of Gradle, you can now specify an url of a zip file containing the Gradle distribution (e.g.: by writing "?DIST=http://services.gradle.org/distributions/gradle-1.3-bin.zip")
  • Where you can specify the installation of Gradle, you can now specify the version instead (e.g.: by writing "?VER=1.3")
  • New global property: It is now possible to set a different user home directory for Gradle (this is "~/.gradle" by default).
  • Better detection of changes of unopened projects when reloading a project.
  • Debug Single and Debug Test Single tasks are considered "blocking" by default.
  • New project property: Java platform for executing build scripts (i.e.: it is now possible to set different one for each project).
  • New project property: Installation directory of Gradle (i.e.: it is now possible to set different one for each project).
  • Test single is allowed for Groovy files as well.
  • It is now possible to write data for the build script to read when running tasks. Note however that due to a Gradle bug (in Gradle 1.3), the input is only forwarded after the input is closed (Ctrl+D is pressed in the output window).

1.1.7 -> 1.1.8

  • Fixed a serious bug which could prevent NetBeans from starting. This bug affects all previous versions.
  • "Skip tests" global option no longer overwrites the arguments defined for cutomized built-in tasks.
  • Run and debug tasks are dynamically added if they do not exist for a given project.
  • Adjusted the scripts generated by the project wizards.
  • Run/debug single commands are now enabled and customizable.
  • Displaying a project folder in favorites will not automatically load the project.

1.1.6 -> 1.1.7

  • It is now possible to define multiple settings configurations for Gradle projects.
  • Built-in tasks can be customized in the project properties.
  • Executing Gradle tasks now use the platform specified in the project properties rather than the one set in the global properties.

1.1.5 -> 1.1.6

  • Red exclamation mark is shown on the project node when any of the files of that project has a compilation error.
  • It is now possible to specify that the output window should always be cleared before building in the global preferences.
  • Refactoring should now consider every source root of each opened project.

1.1.4 -> 1.1.5

  • The output window handling is now much reasonable.
  • Lots of things are now recognized as links to files on the output (including stacktraces).

1.1.3 -> 1.1.4

  • Fixed a small memory leak.
  • Fixed a bug when the loaded project contained circular dependencies.
  • Added version control menus to the pop-up of the project node.
  • Provided dependencies are now recognized. Needs manual adjustment, see the readme for further details.
  • It is now possible to set the maximum number of projects to be cached.
  • It is now possible to open a project in the subprojects node by pressing enter.

1.1.2 -> 1.1.3

  • When debugging test code, the sources are added to the classpath as well as the sources of the tests.
  • Fixed a possible issue which could lead NetBeans to a class cast error.
  • Directories containing a "settings.gradle" are also recognized as Gradle projects.
  • Directories containing a .gradle file with the same name as its containing directory are also recognized as Gradle projects.
  • It is now possible to specify that a Gradle task is "non-blocking". Non-blocking tasks will not be attempted to run concurrently and newly submitted tasks will wait for previously submitted non-blocking tasks to complete. This is to avoid starting multiple Gradle daemons when it is not necessary. Most built-in tasks are marked as non-blocking, the exceptions are debug and run tasks.
  • Fixed a possible NPE, if a Java platform is added to NetBeans which do not have a specification version.
  • The name of the target platform is saved to the project properties file. This is to avoid confusing different kind of platforms.

1.1.1 -> 1.1.2

  • There is a description for the project wizards.
  • Opened projects are reloaded properly even if there are more than 100 projects.
  • Project properties are always written to the ".nb-gradle-properties", even if the default value is used.
  • The plugin should now handle character encoding properly after it has been set in the project properties.
  • If a "webapp" directory is found next to a source directory, it is listed in the project view.

1.1.0 -> 1.1.1

  • Adds New Project wizards
  • Fixes the icon problem of Gradle files.


Verifications for NetBeans versions

7.2 verification PASSED See verification details


Introduction

Allows opening directories containing a "build.gradle" file as a project in NetBeans. The opened project then can be used as a usual Java project.

Since 1.1.3, directories containing a "settings.gradle" and directories containing a .gradle file with the same name as their folder are also recognized as Gradle projects.

[ You have to be logged in to be able to comment. ]

User Comments

  

1.2.9 version works in Netbeans 8.0 RC1

1.2.9 version works in Netbeans 8.0 RC1 !
Posted by eskatos on Feb 27, 2014
  

Re: Plugin tries to load every project I ever opened

It's not that the plugin opens a project but NetBeans and the plugin answers the request of the the IDE. However, I have never experienced what you wrote. I did see NB requesting information from projects from weird reason but certainly not everyone ever opened.

If you have a way to reproduce the issue, please report an issue on the Github page. I might be able to hack around this.
Posted by attila.kelemen on Jan 20, 2014
  

Plugin tries to load every project I ever opened

On several latest versions I noticed that when NetBeans is started the plugin tries to load every gradle project ever opened.
Is there a way to turn off such behavior and load only projects that are actually opened right now? It really is annoying since most of these projects aren't valid now but I still need them on filesystem.
Posted by AndreiLED on Jan 20, 2014
  

Awesome plugin

It has a few glitches but overall it's great.
It helps a lot, don't have to waste time on converting gradle projects to classic NB projects.
Posted by AndreiLED on Jan 20, 2014
  

Re: Project Javadoc

If you don't have the sources of the 3rd party project, then I'm afraid, it is currently not possible.

Please, file an issue on https://github.com/kelemen/netbeans-gradle-project/issues and I'll try to come up with something. In the issue, please describe where you have the javadoc (Maven repository, somewhere in the filesystem, in the project directory, etc.).
Posted by attila.kelemen on Aug 07, 2013
  

Project Javadoc

First of all, many thanks for this plugin and all nice features! I was just wondering how to set the project and 3rd parties javadoc?
Posted by imartinbe on Aug 07, 2013
  

Re: Cool Plugin, like it!

The newproject wizard itself cannot be customized. However, in the next release (probably this weekend) you will be able to define custom variables in the arguments of custom tasks to be replaced with something queried from the user. This is something I actually wrote for this purpose (even though it is a lot more generic). So, you are expected to write a Gradle task which is parameterizable from the command line (e.g.: "-PnewProjectName=MyProject"). In the Gradle task, you may create the new project based on that (although the project has to be opened manually).

I have already added a wiki page (https://github.com/kelemen/netbeans-gradle-project/wiki/Custom-Task-Variables) describing the format of the custom task variable. Note that this is not available in the current release. So, you have to build the plugin from the sources or wait for the next release.
Posted by attila.kelemen on Jun 27, 2013
  

Cool Plugin, like it!

Is there a smart way to customize the newproject gradle templates? As far as I can see one would have to patch the org-netbeans-gradle-project.jar
Posted by christianlerch on Jun 27, 2013
  

Love This Plugin

Gradle is the way to go. I would love to see it get first class support in NetBeans. Keep up the great work on this plugin. I can't go back to Ant or Maven. Gradle is like Maven without the frustration of nothing ever working the way you need it to and with 75% less code - none of which is tedious XML.
Posted by swpalmer on Jun 21, 2013
  

Gradle Support

Thanks for sharing this post about Gradle Support. It's nice and awesome. If I'll this post to my friends they will surely like this. What is SEO
Posted by katherine250 on Apr 07, 2013
  

Re: Fantastic Plugin

Thank you. Loaded projects are cached because reloading projects might take quite a bit of time. So, if you adjust the buildscript and want NetBeans to know about the changes, you have to explicitly reload the project (right click on the project and reload). Regardless, if you run a custom task, it doesn't matter if NetBeans knows about that task. That is, Gradle will simply be asked to execute the requested task.

As for idea tasks, Gradle seems to add some of them regardless if you apply the "idea" plugin or not. By the way, NetBeans relies on the idea plugin as well, so adjusting things in the idea plugin should affect NetBeans (except if you make adjustment to the xmls of Idea).
Posted by attila.kelemen on Mar 22, 2013
  

Fantastic Plugin

I have been looking for a way to develop with Gradle from within an IDE with the ability to run all my tests and debug easily. This was lacking in IDEA and Eclipse would have been my last choice however this plugin is everything I need right now and I am a fan of NetBeans too :)

My only issue is that tasks removed from the build file seem to be cached or at least my old idea tasks do but I can live with that.

Fantastic work thanks a lot.
Posted by -tp- on Mar 22, 2013
  

Re: wrong download

It is not the plugin storing the url but the project you attempt to load. That is, this is the URL specified for the Gradle wrapper (in "gradle/wrapper/gradle-wrapper.properties").

Anyway, I don't think that the URL is wrong because I have just tried it and seems to work (i.e., I can download the zip from a browser). Besides, this is the URL specified in Gradle itself: https://github.com/gradle/gradle/blob/master/gradle/wrapper/gradle-wrapper.properties

Could it be a proxy error? I know from experience that the proxy settings in NetBeans must be properly set because it is somehow used by the Gradle Tooling API.
Posted by attila.kelemen on Mar 06, 2013
  

wrong download

Hello Attila and thanks for your reply, I manually downloaded gradle and by changing the setting I successfully run it!

The gradle zip in my home directory contained only this info:

Moved Permanently

The document has moved here.



I suppose the plugin should be updated with the new url?
Posted by dusty on Mar 06, 2013
  

Re: Plugin unable to download gradle

I have never seen such issue but seems weird. What JDK do you use?

Regardless, you can fix this particular problem by specifying where you have Gradle installed in the global settings: Tools/Options/Miscellaneous/Gradle/Gradle Installation Directory. This way the plugin won't try to download Gradle.

Other than this, what you can try is to delete the Gradle cache (~/.gradle), maybe the zip file got corrupted somehow.
Posted by attila.kelemen on Mar 05, 2013
  

Plugin unable to download gradle

I'm unable to open a project, I get this error:


Failed to load Gradle project: spring-social
org.gradle.tooling.GradleConnectionException: Could not install Gradle distribution from 'http://services.gradle.org/distributions/gradle-1.4-bin.zip'.
at org.gradle.tooling.internal.consumer.DistributionFactory$ZippedDistribution.getToolingImplementationClasspath(DistributionFactory.java:110)
at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:37)
at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:42)
at org.gradle.tooling.internal.consumer.connection.LazyConnection.onStartAction(LazyConnection.java:135)
at org.gradle.tooling.internal.consumer.connection.LazyConnection.withConnection(LazyConnection.java:118)
at org.gradle.tooling.internal.consumer.connection.LazyConnection.getModel(LazyConnection.java:108)
at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection$2.run(ProgressLoggingConnection.java:67)
at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.run(ProgressLoggingConnection.java:81)
at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.getModel(ProgressLoggingConnection.java:65)
at org.gradle.tooling.internal.consumer.connection.LoggingInitializerConnection.getModel(LoggingInitializerConnection.java:53)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$2.run(DefaultAsyncConnection.java:61)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$3.run(DefaultAsyncConnection.java:79)
at org.gradle.messaging.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:214)
at java.util.zip.ZipFile.(ZipFile.java:144)
at java.util.zip.ZipFile.(ZipFile.java:158)
at org.gradle.wrapper.Install.unzip(Install.java:148)
at org.gradle.wrapper.Install.createDist(Install.java:65)
at org.gradle.tooling.internal.consumer.DistributionFactory$ZippedDistribution.getToolingImplementationClasspath(DistributionFactory.java:106)
... 15 more

Someone has some clues on how to fix it, even by hand?
Posted by dusty on Mar 05, 2013
  

Re: Re: Re: Great Plugin

Missing dependency issues would be a problem but I don't show the source folders because I don't know where they are at that time. That is, I load the project using the Tooling API of Gradle which tells me everything (where the source folders are, the dependencies, etc.) in a single method call and I have no control over it.
Posted by attila.kelemen on Nov 11, 2012
  

Re: Re: Great Plugin

"I don't know what you mean on "ability to edit/remove needs to be exposed", they can be edited and removed."

Sorry my bad I never spotted the button in the project properties dialog...

Just going back to the issue of loading, and to give my two cents...

As the project is loading, within the projects tab only the Dependencies folder and the (build/settings).gradle files are visible. meaning that when I open a gradle project I cannot get to my source/test files until gradle has finished loading.

Is it possible to re-think the loading of a gradle project to allow the src/test folders to be visible, so that when a user opens a project they can immediately get to their code.

Although if I understand it correctly if this was the case, netbeans would highlight missing dependency issues in the code until gradle has finished loading right? If so I think thats a reasonable, especially if those missing dependency issues are resolved in the netbeans editor as soon as the gradle project is fully loaded.

Posted by satory on Nov 10, 2012
  

Re: Great Plugin

Hi,

Thank you. I will try to answer your remarks.


  1. The loading time depends on a few factors: When you open a project, Gradle will download every declared dependencies, their sources and javadoc. Also, if you have not configured where Gradle is, then it will also download Gradle itself. These can take quite a lot of time. However, since artifacts are cached, this should become less problem after using Gradle for a while.


    When you first load a project in NetBeans a Gradle daemon is started to execute the build scripts. Gradle daemon remains after the project is loaded (for about 3 hours), so subsequent project loads will not suffer this penalty. Also there is a lot of thing Gradle caches, so subsequent project loads should be considerably faster.


    Projects with lots of subprojects will also take more time to load (loading a project with above 100 subprojects can take minutes to load).



  2. Most information is not accessible to me. So I cannot display the Maven groupid or similar thinds. Even what I can (e.g.: source folders) would be read-only because the build scipt is a code and it is not possible to analyze it in general.


  3. I don't know what you mean on "ability to edit/remove needs to be exposed", they can be edited and removed.


  4. Also in the current (unreleased) version in the master branch allows you to fully customize the built-in tasks (build, run, etc.).

Posted by attila.kelemen on Nov 10, 2012
  

Great Plugin

Hey this plugin is great, although I do have a few small issues.

I have a single project, but I notice that it takes netbeans a while to full finish loading it up when I open netbeans, where as other projects appear nearly instantaneously.

An improved Project properties dialog is needed, with both core/existing netbeans java project properties pages kept, like general project information, declaring the actual paths of the Src and Test folders and even improving what actions are assigned to which gradle tasks. - Much like a maven project properties dialog shows.

Custom tasks are a god send, but we need more control on them, the ability to edit/remove needs to be exposed, probably through an enhanced project properties dialog...

Other than those issues that I have, I think this plugin is great.
Posted by satory on Nov 10, 2012
  

Re: Re: Unfortunatelly it doesn't work for me

No problem. I hope you will be able to successfully use the plugin.
Posted by attila.kelemen on Oct 24, 2012
  

Re: Re: Unfortunatelly it doesn't work for me

Sorry for all the fuss, turns out Bug 218373 is to blame. An attempt to install any other plugin or to update caused the installation to break down.

Managed to solve the problem by installing the latest stable release (7.2.1).

Yet again sorry for the inconvenience and thank you for the prompt answer.
Posted by AndreiLED on Oct 24, 2012
  

Re: Unfortunatelly it doesn't work for me

I have seen this issue but I don't think it has anything to do with this plugin. That is, the plugin does not really do anything until you try to open a Gradle project.

I think it has to do something with NetBeans when installing updates through the update center and also installing a plugin. It might be due to a buggy dependency resolution.

What I would do is first update NetBeans, then install the plugin (and don't install the plugin with updates from the update center). If you have stack traces, etc., it might be worth to report to the NetBeans dev. team.

EDIT: I believe this is the same problem: http://netbeans.org/bugzilla/show_bug.cgi?id=178087 but reported to an earlier release. Since this occured to you while updating other components and added this plugin, I believe that it can be triggered by installing a new downloaded plugin along with updates from the update center.

If you install this plugin after every update, there should be no errors (I'm using it with the latest updates).
Posted by attila.kelemen on Oct 24, 2012
  

Unfortunatelly it doesn't work for me

Not only it doesn't work for me, my NetBeans simply won't even start after the plugin installation.

Symptoms:
1) First during the installation it asks to install a bunch of other required plugins and then to restart the IDE.
2) During the restart NetBeans tells me that it can't enable a lot of plugins (77 total) because of unmet dependencies. And click on Disable plugins doesn't help at all - NetBeans would simply hang up on the loading splash screen and do nothing.
Funny thing here is that mostly actual versions of plugins installed are higher then required by that bunch of new plugins, so why won't it work?

After that I had to completely re-install NetBeans to be able event to start it.


Any ideas what I may be doing wrong?
Posted by AndreiLED on Oct 24, 2012
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo