Gradle 2.0-rc-2 throws exceptions under Netbeans

(Andrey Hihlovskiy) #1

Steps to reproduce: 1. Install Gradle 2.0-rc-2. 2. Start Netbeans, install Gradle plugin. 3. Select menu “Tools/Options”, switch to “Miscellaneous/Gradle”. 4. Change “Gradle installation directory”, so that it points to Gradle 2.0-rc-2. 5. Click “OK” button. 6. Try building reloading gradle project within Netbeans (context menu “Reload”), the error is thrown:

Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
    initialization script '/tmp/nb-gradle-plugin-ahi/dyn-model-gradle-init-ca5a501bd81926a09bdd76f11443bab3.tmp': 3: The class 'DynamicGradleModelPlugin' has an incorrect modifier private.
     @ line 3, column 1.
       private class DynamicGradleModelPlugin implements Plugin<Project> {
          1 error
           at org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.compileScript(
     ... 69 more

(Szczepan Faber) #2

Can you gist the full stack trace? It could be a problem in NB plugin which is not maintained by our team. Does it work correctly with 1.12? It might be better to reach out to the NB plugin team about this issue.

Hope that helps!

(Andrey Hihlovskiy) #3

Thanks for the hint, I’ll try contacting Netbeans gradle plugin team.

Here is the full stacktrace:

(Attila Kelemen) #4

This is a bug in the NB plugin (I guess Groovy incompatibility). Should be fixed in master and will have the fix released this week.

(Andrey Hihlovskiy) #5

Thanks for prompt reaction, very much looking forward to new improved version.

(Andrey Hihlovskiy) #6

I see that Netbeans Gradle Plugin 1.3.1 solves this problem! Wow! Now I can use Gradle 2.0 with Netbeans. Many great thanks!