I think it will be faster to use groovy (its my experience and just for me) in developing my game.
my game project mostly written in java and I want to continue it with groovy.
I have some questions :
1-how to work with java and groovy together in JME SDK?
2- should I change the build script? where is it? and what is it ant or gradle?
3- is there any plugin for netbeans IDE to do that ? I mean , compile groovy source file and java source files in a java project and ignore the differences …
You first just need to add the groovy jar’s to your libraries. I don’t know if this only applies to scripting with groovy though.
Technically groovyc compiles groovy to .class files so they can be used directly without any change to a build script or the IDE even knowing about that. However you might want to add that groovyc call to the build script, that’s true. The SDK uses ant for that.
That being said there is a groovy netbeans plugin, but I can’t tell you if it enables you to compile groovy or if it’s only syntax highlighting.
I’ve done mixed Java/Groovy compilation in Eclipse with Gradle. If you want to do all new development purely in Groovy, as long as the Groovy files are being compiled you’re fine. However, if you want to do mixed Java/Groovy with Java calling Groovy code, things are a bit more complicated (but still easy with good tools). In this case, the Groovy compiler must produce a set of empty stubs that the Java compiler uses to compile the Java code, then the Groovy compiler runs to compile the Groovy sources against the Java code. If you use Gradle to build your project and have the sources compiled with the Groovy task instead of the Java task, all of this happens automatically. I’d assume that Netbeans has a good Gradle plugin, and if so, it should all play nicely together for you.