Gradle 2.0
forums.gradle.org
forums.gradle.org
> What is Gradle?
> Gradle is build automation evolved. Gradle can automate the building, testing, publishing, deployment and more of software packages or other types of projects such as generated static websites, generated documentation or indeed anything else.
Basically, if you're using Eclipse and Ant for a new Android app, you're doing it very wrong.
Until they fix the performance problems I will keep using Eclipse, even though I am not a big fan of it.
Back in 2009, James Strachan (the creator of Groovy) stated that if he'd known about Scala first he probably wouldn't have built Groovy [1]. This Dr. Dobb's article [2] also has some good points on evaluating Groovy and whether or not it will continue to thrive. The simplicity of its syntax vs scala is a great point for Groovy though.
[1] - http://macstrac.blogspot.com/2009/04/scala-as-long-term-repl... [2] - http://www.drdobbs.com/jvm/the-groovy-conundrum/240147731
I am stuck on a few projects at work using Groovy/Grails. Groovy itself has been fine and I regularly switch between Groovy, Python and JavaScript with little more than a Google to double check syntax.
However dealing with Grails is a damn nightmare. I recently ran into a bug where grails parsed a parameter query variable containing a nbsp symbol. Instead of giving me a string with an nbsp character, it inserted an "A" with an accent mark in addition to the ndbsp character. Two for the price of one!
The best part was, this only happened after I compiled the app to a war file so it didn't show up in development.
This is the 3rd parsing bug in grails I have found in the last few months alone.
Another one was the when using "render as obj as JSON" shortcut for controllers. The parser was converting "</" characters into a single Unicode character. Causing the HTML string I was trying to render break. However doing the conversion to JSON manually in a service class and setting the right response headers then returning the JSON string worked fine.
The third one was XML builder. Errors are thrown if I have empty leaf nodes (at a minimum I need to add {} to the end of leaf nodes). Only works in dev however as gain when I build the war it does not work at all. Instead I just build my XML string manually.
The final thing I don't care for is the GORM. We have never gotten DB auto reconnect to work with any MSSQL server or DB2 in the last 2 years (that we have been actively trying to get it to work) across 4+ applications.
tl;dr
Groovy is OK but Grails is a total PITA.
www.gradle.org/overview does say "The Gradle design is well-suited for creating another build script engine in JRuby or Jython. It just doesn't have the highest priority for us at the moment. We happily support any community effort to create additional build script engines."
I have looked at the Gradle source code and Groovy seems to be tightly entangled in it, and it would be difficult to get Gradle to use another DSL language. I'm also doubtful about what they say about happily supporting community effort to create other script engines. Based on my previous experience with the people behind Groovy, not only with regards to the Groovy++ fiasco of mid- to late-2011 but many times before, that line could easily mean "We're happy to hear about any community effort to create additional build script engines so we can scuttle your attempt before it gets very far."
> The simplicity of its syntax vs scala is a great point for Groovy though
Did you say Groovy's syntax is simple? The Gradle DSL is just a tiny subset of Groovy's grammar, see [1]. It's also still stuck on Antlr 2 because no-one wants to try upgrading it to Antlr 4. Scala was designed so its grammar would be light and the functionality residing in the libraries.
[1] http://svn.codehaus.org/groovy/eclipse/trunk/base/org.codeha...
I wish people would stop quoting this as if it is some kind of damning evidence against Groovy as a language. It is sad because I often want to say generous things about frameworks and tools that are competitors to ones I am involved in, but then I remember how ruthlessly and persistently people exploit this line (almost guaranteed to get quoted in every Scala discussion if someone mentions Groovy) and I realise that in the real world you can pay a lot for being generous at the wrong time.
Compare that quote to this[1] presentation where Paul Phillips lays in to scala for 50 minutes. Even when somebody does criticize their own creation I doubt they mean "Hey everybody, that thing I spent a bunch of time on? Throw it all in the garbage, its pointless".
Enterprisey J2EE people regard it as a new fangled something they don't have time for.
More pragmatic, hip to it programmers seem to give more attention to scala, clojure, jruby.
Back when I was part of a project that was developing a JSF framework on top of RichFaces, I started pushing for Groovy support on our SDK.
This was 2009, Groovy was everywhere on JUG talks in Germany, most talking about Grails success stories. On the same year while attending JSF Days in Austria there were some Oracle guys showing how to do JSF applications in Groovy and the possible inclusion the the next J2EE revision.
Other team on the same company was replacing the Perl battle tested installation scripts by Groovy ones.
Nowadays, if it wasn't for Android Studio and its dependency on Gradle, I would hardly notice its use.
Our startup is writing "enterprisey" B2B knowledge management software, but almost all of our code is written in Groovy. But I'm "hip to it" enough to at least own several Clojure and Scala books and have both on my "to learn" list. shrug
Personally I'm a big fan of Groovy. It gets an awful lot of things right, IMO. The syntax is mostly a superset of plain Java, but a lot of things that are required in Java are optional in Groovy. But Groovy is dynamic and has meta-programming, closures, dynamic typing, etc. For my money, it really hits the sweet spot. Easy to learn for a Java person, but way more productive than Java.
Agreed, which is why it such a shame it isn't more prevalent.
Along with the features you mention, I'll add, good repl support, which is a must for modern languages in my book and is a huge productivity boost.
The other day I learned that Solr supports Groovy as an embedded language to write extensions in. It's amazing.
If Groovy's still under-appreciated after 10 years, there's got to be a reason.
I think it's actually used incredibly widely but people don't even know it, Gradle being an example, but lots of other similar cases. Groovy just doesn't get credit a lot of the time because it embeds so seamlessly in to the Java world.
What a terrible waste of publicity.
The very first sentence in any link should at least give a hint what the thing in question is and if it doesn't, it should not appear on Hacker News.
If you've done any real Java development within the past five years, then you at least know what Gradle is. If you haven't, then you won't, and that is perfectly okay. Frankly, this maxim is true of half the announcements on HN. If I don't recognize something at all, then usually it's a random Rust or Julia thing... and I've grown to conditioned to simply ignore it and skim onward.
I do agree that any public announcements SHOULD include a blurb for the new people who are hearing about the subject for the very first time. As far as HN irritations go, however, that bothers me a lot less than the tendency of announcement threads to turn "meta". Fewer comments on the subject matter itself... more comments on the announcement’s font selection or color scheme, copy verbiage, logo design, or just completely random digressions to discuss why Rust does it better, etc.
And of course Grails is promoted by VMWare and Gradle by GradleWare. There's no info about GradleWare's true owners in the verbiage on their about page. Either they want to be bought by VMWare, or they were started with seed money from them and effectively controlled by them.
I am yet to touch Gradle outside Android projects.
I don't use Gradle on anything at the moment, though I've looked into it a few times as a possible replacement for maven on my team.
I wonder how many other visitors were lost this way (Google Analytics should know, look for people going from this post to your Forums via the logo, and then exiting).