Modern Digital Website Security: Prepare to face any form of malicious web activity and enable your sites to optimally serve your customers.
Containers Trend Report: Explore the current state of containers, containerization strategies, and modernizing architecture.
Valami at Valahol
Valaholváros, HU
Joined Aug 2012
Stats
Reputation: | 2 |
Pageviews: | 74.4K |
Articles: | 2 |
Comments: | 7 |
Articles
Comments
Nov 08, 2012 · Martin Steffen
Thank you for the catch. The code is not thread-safe. Although it cannot cause a bug because currently this method and the close() are never called concurrently (they are always from NbGradleProject.PROJECT_PROCESSOR which is single threaded). Anyway, this should be fixed.
Next time please file an issue instead because I might not notice here.
Anyway, if you are wondering why I didn't use a simple lock instead: No real reason, just for fun. I like to play with concurrency and I thought there is not much to lose if I screw it here (as I sadly did). Obviously, I should have been more careful.
Nov 08, 2012 · Martin Steffen
Thank you for the catch. The code is not thread-safe. Although it cannot cause a bug because currently this method and the close() are never called concurrently (they are always from NbGradleProject.PROJECT_PROCESSOR which is single threaded). Anyway, this should be fixed.
Next time please file an issue instead because I might not notice here.
Anyway, if you are wondering why I didn't use a simple lock instead: No real reason, just for fun. I like to play with concurrency and I thought there is not much to lose if I screw it here (as I sadly did). Obviously, I should have been more careful.
Nov 06, 2012 · Douglas Maxwell
Thank you for the article. I would like to respond to the request:
Oct 25, 2012 · Martin Steffen
Thank you for the article. It is nice to see that the Gradle plugin is being used for something that it was not explicitly planned for. Anyway, I would like to answer to the wishes related to the Gradle plugin:
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).
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
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