How to use Groovy 2.0 in netbeans

后端 未结 2 1635
后悔当初
后悔当初 2021-01-26 08:43

I want to use groovy 2.0 in Netbeans 7.1.2 because I want to use the static type checking.

By default that Netbeans uses the library Groovy 1.6.4 - groovy-a

相关标签:
2条回答
  • 2021-01-26 09:31

    NetBeans 7.2 came out today, and that ups internal Groovy support to v1.8.6

    I don't think you can just drop Groovy 2.0 into NetBeans and expect it to support it (so much has changed)

    However, this doesn't stop you using your own Ant/Gradle (there's a work in progress Gradle plugin here) build script and using this to manage your dependencies. But NetBeans won't know anything about the type checking, so you will probably have to ignore some stuff that it says is an error (but which isn't)

    0 讨论(0)
  • 2021-01-26 09:42

    Just replace the netbeans-7.2.1/groovy/modules/ext/groovy-all.jar for the new one, but respecting the name groovy-all.jar, and the compilations will be done using groovy 2.

    Test it executing :

    println GroovySystem.getVersion()
    
    0 讨论(0)
提交回复
热议问题