DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Curious about the future of data-driven systems? Join our Data Engineering roundtable and learn how to build scalable data platforms.

Data Engineering: The industry has come a long way from organizing unstructured data to adopting today's modern data pipelines. See how.

Threat Detection: Learn core practices for managing security risks and vulnerabilities in your organization — don't regret those threats!

Managing API integrations: Assess your use case and needs — plus learn patterns for the design, build, and maintenance of your integrations.

Avatar

Attila Kelemen

Valami at Valahol

Valaholváros, HU

Joined Aug 2012

Stats

Reputation: 2
Pageviews: 75.3K
Articles: 2
Comments: 3
  • Articles
  • Comments

Articles

article thumbnail
The Definitive Gradle Guide for NetBeans IDE
Gradle is a build tool like Ant and Maven only much, much better!
January 14, 2013
· 64,609 Views · 1 Like
article thumbnail
Gradle Plugin for NetBeans IDE 7.2
I (https://github.com/kelemen) have been (and I still do) use Maven for development of Java code. My main reason for using Maven for development is its great NetBeans IDE support, so that I don't need to maintain IDE project files separately. As much as I like this support in the Maven world, I feel the limits of Maven every day I use it. Since I first saw the Gradle project, I knew that this is the least that I've always wanted from a build tool. So I started to look for NetBeans IDE support for Gradle. To my sadness there is only support for Eclipse and Idea. Aside from the fact that I prefer to use NetBeans IDE, I felt the IDE support to be limited for Gradle, (although the last time I read about Gradle support in IDEA, it seemed promising). Not long ago, I came across Geertjan's plugin and I felt that that writing such plugin is possible without enormous effort. So I downloaded his sources and started to analyze them and rewrite the plugin, so that it works with most Gradle scripts. There are many new features available in my version, such as these: slow tasks are done in a background thread source paths are retrieved from the model "test single" Screenshots: Project menus: Project dependencies: Project debug test: However, I removed subprojects and now each project needs to be opened manually, it is more efficient if you don't plan to edit all the subprojects; the drawback is that you cannot open projects without a build.gradle. The main problem with Gradle daemon performance is that on the first project load, Gradle downloads every single dependency. After that, I found the performance acceptable (especially after I implemented caching of already loaded projects). I have tested it with a relatively large project (>60 subprojects, lots of Java code): It took me about 2 minutes to load the project which seems ok to me for such an enormous project. Other than the project loading, the performance depends on NetBeans which is good. How to try it There is currently no compiled version of the plugin, so you have to compile it for yourself, if you want to try it. You can clone/download the sources from here: https://github.com/kelemen/netbeans-gradle-project After downloading the sources, open the project in NetBeans IDE. There generally two approaches you could consider: Generate the .nbm file (by choosing "Create NBM" in the project's popup) and install the plugin as you would do with any other third-party plugin. "Run" the project. This is the safest thing to do because this will start a new NetBeans instance with a brand new user directory (in the build folder). This way your own NetBeans installation will be unaffected. Help I would appreciate I'm pretty new to the NetBeans APIs (i.e., this is my first time using them), so someone might help me with the project dependencies (possibly Mavenize the plugin). And if it is possible, allow for the plugin to rely on a user specified installation of Gradle (there is some risk in it because Gradle does not seem to be very backward compatible). If you happen to know the Project API in NetBeans well, that could prove really helpful, so that I don't need to spend days figuring out, how things need to be done in the API. How to contact me You can contact me through my GitHub account: https://github.com/kelemen
August 12, 2012
· 10,704 Views

Comments

Gradle Plugin for NetBeans IDE 7.2

Aug 19, 2012 · Attila Kelemen

If you have checked the plugin, you are encouraged to dowload it again from https://github.com/downloads/kelemen/netbeans-gradle-project/org-netbeans-gradle-project.nbm.

It is now possible to set the installation directory of Gradle and setting it greatly increases performance. You can set it on the Tools/Options/Miscellaneous/Gradle panel. Also it is now possible to open projects not having a "build.gradle" (by opening their parent and opening them from there).

Gradle Plugin for NetBeans IDE 7.2

Aug 18, 2012 · Attila Kelemen

It means, that when the project is opened, the tooling api of Gradle will make sure, that every dependency is available locally (sources, test dependencies, etc.) and will also load every project which is part of the multi project build even if it is not a dependency of the project (this is necessary for Gradle, since any project may modify any project in a multi project build). That is, when I request Gradle to parse the project it returns everything to me in one step. It will not execute any tasks when opening the project, it is just slow compared to opening a Maven project. However I implemented a simple optimization: since Gradle loads every project of a multi project build, I will cache the parsed project, so opening other project of that particualry multi project build will be an instant. Also, reloading a project, automatically reloads every project of the multi project build.

Building, executing tasks, etc. takes exactly as much time as if you were executing it manually (with the Gradle daemon).

You may try it and see for yourself if the performance is adequate. For convenience, I have shared the compiled NetBeans module as well: https://github.com/downloads/kelemen/netbeans-gradle-project/org-netbeans-gradle-project.nbm

Gradle Plugin for NetBeans IDE 7.2

Aug 18, 2012 · Attila Kelemen

It means, that when the project is opened, the tooling api of Gradle will make sure, that every dependency is available locally (sources, test dependencies, etc.) and will also load every project which is part of the multi project build even if it is not a dependency of the project (this is necessary for Gradle, since any project may modify any project in a multi project build). That is, when I request Gradle to parse the project it returns everything to me in one step. It will not execute any tasks when opening the project, it is just slow compared to opening a Maven project. However I implemented a simple optimization: since Gradle loads every project of a multi project build, I will cache the parsed project, so opening other project of that particualry multi project build will be an instant. Also, reloading a project, automatically reloads every project of the multi project build.

Building, executing tasks, etc. takes exactly as much time as if you were executing it manually (with the Gradle daemon).

You may try it and see for yourself if the performance is adequate. For convenience, I have shared the compiled NetBeans module as well: https://github.com/downloads/kelemen/netbeans-gradle-project/org-netbeans-gradle-project.nbm

User has been successfully modified

Failed to modify user

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: