All Projects → kelemen → Netbeans Gradle Project

kelemen / Netbeans Gradle Project

This project is a NetBeans plugin able to open Gradle based Java projects. The implementation is based on Geertjan Wielenga's plugin.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Netbeans Gradle Project

Samples
JavaFX samples to run with different options and build tools
Stars: ✭ 352 (+101.14%)
Mutual labels:  gradle, netbeans
openjfx-docs
Getting started guide for JavaFX 11
Stars: ✭ 70 (-60%)
Mutual labels:  netbeans, gradle
Codeeditor
Code Editor Native Way
Stars: ✭ 155 (-11.43%)
Mutual labels:  gradle
Androidlibrary
Android library to reveal or obfuscate strings and assets at runtime
Stars: ✭ 162 (-7.43%)
Mutual labels:  gradle
Worldedit
🗺️ Minecraft map editor and mod
Stars: ✭ 2,288 (+1207.43%)
Mutual labels:  gradle
Gradle Android Plugin
[Deprecated] Gradle Android Plugin 中文版使用手册,如有纰漏,望斧正
Stars: ✭ 155 (-11.43%)
Mutual labels:  gradle
Springboot Rabbitmq
RabbitMQ为异步消息处理提出了一个很好的解决方案,它是一个非常好用的消息中间件,主要用于中间件的解耦,同时,Spring Boot为RabbitMQ提供了支持, Spring Boot为Rabbit准备了spring-boot-starter-amqp,spring-rabbit 支持 AMQP(即Advanced Message Queuing Protocol,高级消息队列协议,是应用层协议的一个开放标准),并且为RabbitTemplate和RabbitMQ提供了自动配置选项
Stars: ✭ 159 (-9.14%)
Mutual labels:  gradle
Netbeans Psr Formatting
NetBeans configuration settings for PSR 1&2
Stars: ✭ 152 (-13.14%)
Mutual labels:  netbeans
Jitpack.io
Documentation and issues of https://jitpack.io
Stars: ✭ 2,156 (+1132%)
Mutual labels:  gradle
Java Markdown Generator
Java library to generate markdown
Stars: ✭ 159 (-9.14%)
Mutual labels:  gradle
Crown
Based on SpringBoot2, Crown builds a rapidly developed web application scaffolding.
Stars: ✭ 161 (-8%)
Mutual labels:  gradle
Versioning
Gradle plug-in to generate version information from the SCM branch (Git or Svn)
Stars: ✭ 157 (-10.29%)
Mutual labels:  gradle
Idea Gradle Dependencies Formatter
Gradle dependencies formatter for IntelliJ IDEA
Stars: ✭ 156 (-10.86%)
Mutual labels:  gradle
Jda Utilities
A series of tools and utilities for JDA to assist in bot creation
Stars: ✭ 158 (-9.71%)
Mutual labels:  gradle
Coolweather
Weather App that uses Android best practices. Android Jetpack, clean architecture. Written in Kotlin
Stars: ✭ 154 (-12%)
Mutual labels:  gradle
Simplenet
An easy-to-use, event-driven, asynchronous network application framework compiled with Java 11.
Stars: ✭ 164 (-6.29%)
Mutual labels:  gradle
Unified Code Coverage Android
Mixing the coverage data from both Instrumented and Unit tests
Stars: ✭ 155 (-11.43%)
Mutual labels:  gradle
Multiselectspinner
Android - Select Multiple Items from Spinner with Filtration.
Stars: ✭ 158 (-9.71%)
Mutual labels:  gradle
Android Clean Architecture
Showcasing a Clean Architecture approach from our Android applications framework!
Stars: ✭ 160 (-8.57%)
Mutual labels:  gradle
Gradlewiki
关于Gradle编译你需要知道的一切
Stars: ✭ 174 (-0.57%)
Mutual labels:  gradle

Current changes

The release notes for all versions (since 1.1.1) can now be viewed in the release-notes directory. Also, there is a list of changes applied but not yet released in not-released-changes.md.

Downloads

The latest release can be downloaded from http://plugins.netbeans.org/plugin/44510/gradle-support and is also available via the Update Center (Tools/Plugins: Look for "Gradle Support").

JDK 6: If you are using NetBeans with JDK 6, the last version of the plugin compatible with Java 6 is 1.3.0. Note: You will still be able to open Java 6 based projects (even Java 5). The limitation applies only for the JDK used to start NetBeans.

General Description

This project is a NetBeans plugin able to open Gradle based Java projects. The implementation is based on Geertjan Wielenga's plugin. You can open a folder as a project in NetBeans like with any other project and start editing the code without actually generating any other NetBeans project files.

About J2EE projects: This plugin sees web projects as simple J2SE projects with an additional "webapp" directory, so many features related to web projects will be disabled in Gradle projects. Hildo's Gradle JavaEE Support might be installed for better support.

You can read more about the plugin on the wiki pages.

Troubleshooting

I have updated the plugin and now cannot load projects

You may see an exception like this: FileNotFoundException: JAR entry XXX.class not found in YYY\gradle-tooling-api.jar. This happens because the Gradle daemon caches some jars and some of them might change when updating. The issue can be reproduced using Gradle 1.8 and above when using the new API to load a project (can be adjusted in the global settings).

To fix this, you have to kill the Gradle daemon (a java process) and reload the project.

LinkageError: "loader constraint violation", debugging does not work

Attempting to use Gradle 1.8 will break debugging functionality in NetBeans (not only for Gradle projects). The workaround is not to use Gradle 1.8: Specify another version to load the Gradle project in the project properties. Note that once you have loaded a Gradle 1.8 project, you have to restart NetBeans to fix debugging features.

The issue in Gradle is fixed in Gradle 1.9-rc-1. However, when using nightly builds, you have to use 1.10-20131011231056+0000 or later.

Read issue #74 for details.

NetBeans hangs while starting

In version 1.1.7 there is a known issue which might cause a dead-lock in NetBeans. It is fixed in 1.1.8 but to be able to upgrade you will need to disable the currently installed one manually.

The classpaths are wrong within NetBeans

This plugin loads an IdeaProject instance from the build script and therefore configurations applied to the Idea plugin (apply plugin: 'idea') will be detected by the NetBeans plugin as well.

Therefore you can add code to the build script to manually edit the classpath:

idea {
  module {
    scopes.COMPILE.plus += configurations.myconfig;
  }
}

The above code adds the dependencies of the "myconfig" configuration to the compile time classpath of the subproject. Don't forget to call apply plugin: 'idea' before the above code can be applied.

How can I configure the provided dependency scope?

Gradle does not yet have a concept of provided dependencies in the Java plugin (it does have in the War plugin). Most developers solve this by adding a user defined configuration like this:

configurations {
  provided
}

Then after adding the dependencies, adjusts the classpaths:

sourceSets {
  main {
    compileClasspath = compileClasspath + configurations.provided;
  }
}

This way Gradle will be able to compile the sources. However, the NetBeans plugin is ignorant of user defined configurations and therefore to make the project load properly in NetBeans, you will need to append the following code to the build script:

idea {
  module {
    scopes.PROVIDED.plus += configurations.provided;
  }
}

In version "1.1.3" or below, the above code should be

idea {
  module {
    scopes.COMPILE.plus += configurations.provided;
  }
}

because the NetBeans plugin did not expect provided dependencies. Note however that in both cases provided dependencies will be listed amongst the compile time dependencies within NetBeans.

NetBeans seems to load projects without asking

Most likely you have a project with more than 100 subprojects (including the root). To avoid unnecessary loading of projects you should increase the number of projects to be cached. This can be changed on the Tools/Options/Miscellaneous/Gradle panel.

Loading the project takes too long

There can be several causes for this problem:

  • On the first project load, Gradle will download every dependency and this may take quite a lot of time if you have lots of dependencies.
  • If loading the project waits on "Load projects" then chances are that the gradle daemon got corrupted. You should delete the "daemon" directory in the ".gradle" directory of your home directory (System.getProperty("user.home")). If it does not help, remove the entire ".gradle" directory (note that this will also remove your local artifact cache).
  • If loading the project waits while trying to retrieving the dependency of a project, you might need to configure the proxy settings in NetBeans.

Cannot load a project: The error message says that the Gradle daemon gave up after 100 attempts

The Gradle daemon got corrupted. You should delete the "daemon" directory in the ".gradle" directory of your home directory (System.getProperty("user.home")). If it does not help, remove the entire ".gradle" directory (note that this will also remove your local artifact cache).

How can I speed up the project opening?

The only thing you can do is to specify the installation directory of Gradle. This can be done on the Tools/Options/Miscellaneous/Gradle panel. This way you can even jump to the Gradle source code from a Gradle script (using ctrl + click).

I do not have a build.gradle file for every project. How can I open these projects?

Open the parent project of the project you want to open. Once you have opened the parent project, you may right click on any of its child projects and open it even if it does not have a build.gradle.

Note however, that I recommend to have a build.gradle file for every project (even if empty) you might want to open because even if you open projects without a build.gradle, these opened projects will not be opened the next time you start NetBeans.

I have a build.gradle file in a directory but NetBeans does not recognizes it as a project

Gradle projects found in the temporary directory cannot be opened for techincal reasons. Move these projects from the temporary directory.

Classes of the Gradle API are not recognized by the editor

I know of this problem but it seems that it is not possible (with reasonable effort) to solve this without a new NetBeans API. Don't despair, there is a hope that this change might get added (note however that this may not be trivial to add to NetBeans).

I get the error: "Cannot rename file settings.gradle in XXXX to build.gradle"

You might have an old Gradle plugin installed and it seems that they cannot co-exists. Remove the old plugin. See Issue #4 for further information.

Gradle files get renamed to build.gradle

The same as the previous issue:

You might have an old Gradle plugin installed and it seems that they cannot co-exists. Remove the old plugin. See Issue #4 for further information.

Current Limitations

  • It is not possible to directly open projects without a build.gradle. To open such projects, open its parent project and find the project to be opened in the SubProjects node, then right click/"Open Subproject".
  • The character encoding for the source file is not read from the Gradle script but can be set separately in project properties (stored with the settings.gradle in .nb-gradle-properties).
  • It is not detected automatically when the project needs to be reloaded. The "Reload Project" action must be executed manually (from the project's popup menu). No automatic detection is done because reloading the project is slow (just like opening it).
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].