13 ms·
> But the modern Java developer uses Gradle I'm a little skeptical of this. More like the developer in the future uses Gradle. Usually when I go to a project
by tieTYT 12y ago
> But the modern Java developer uses Gradle
I'm a little skeptical of this. More like the developer in the future uses Gradle. Usually when I go to a project's home page, I see documentation on how to include the Maven dependency, not the Gradle dependency. It's pretty obvious how to convert one format to the other, but my point is I think most people are using Maven.
- pjmlp 12y agoGradle is mainly being pushed by Grails and Android development. I don't know of any other project using it. We are always doing Maven or Ant. If Gradle is the future I hope it gets improved, I gave up on Android Studio given its dependency on Gradle and how it drags my dual core with 8 GB to its knees when compiling.
- pron 12y agohttps://github.com/search?q=gradle&type=Code&ref=searchresults https://github.com/search?q=gradle&type=Code&ref=searchresul... I also know that Netflix use Gradle for pretty much all their Java stuff.
- revscat 12y agoSouthwest Airlines uses it.
- sadris 12y agoAnd Minecraft Forge.
- heavenlyhash 12y agoPersonal anecdote, I stopped trying to develop for MC Forge in version 1.7 because the gradle build they switched to was unbelievably slow and difficult to use. After several days of poking it, I still couldn't understand why asking gradle for a simple list of available tasks was taking >10 seconds, and when I tried to give my workspace to a friend on another computer, I discovered I had totally I failed to get a list of coherent commands that I was 100% sure could reproduce my workspace on a new machine, because of large amounts of scattered hidden state I had failed to detect. Part of this might be poor build config design, but gradle certainly helped enable a lot of poor behavior and certainly doesn't impress me with its performance for trivial tasks.
- eeperson 12y agoIs Grails really pushing Gradle adoption? My experience has always been that the integration between the two is pretty bad. Are things better now that they finally... released a real Gradle plugin to support Grails 2?
- pjmlp 12y agoThat was my perception. I don't have Grails experience.
- elchief 12y agoSpring is pushing it hard in all their new tutorials, even non-Grails. Which annoys the heck outta this Maven guy.
- vanilla 12y agolibGDX (cross plattform game lib.) also made a push to gradle
- vorg 12y ago> I gave up on Android Studio given its dependency on Gradle and how it drags my dual core with 8 GB to its knees when compiling That could be the slow, dynamically-typed Groovy in Gradle that's dragging your machine. Gradle needs to bundle another build language. Since the goal of statically-typed (and hence speedier) Kotlin is to make it easier to write IntelliJ IDEA [1], on which Android Studio is built, instead of using Java, the logical choice is Kotlin. Gradle's developer says they'll happily support any community effort to create additional build script engines other than Groovy, but it isn't a priority for them right now [2]. Perhaps the Kotlin team need to kick off a Kotlin build engine for Gradle (though because one of the Kotlin developers was a victim of the Groovy++ fiasco, I'd understand if the Kotlin people are hesitant about having anything more to do with Groovy ecosystem software like Gradle). [1] http://blog.lunatech.com/2011/08/24/scala-ceylon-kotlin-goals http://blog.lunatech.com/2011/08/24/scala-ceylon-kotlin-goal... [2] http://www.gradle.org/overview http://www.gradle.org/overview
- pjmlp 12y agoKotlin was exactly the reason I was thinking to move from Eclipse ADT to Android Studio. So far I have been using the Eclipse ADT/CDT for my hobby development, mainly with C++ (just graphics stuff). Then I thought to try out Kotlin instead, but could not. It was worse than waiting for my NDK C++ builds to finish, with the whole computer at 100% CPU usage. I ended up filing a ticket, like many other developers already did.
- deleted 12y ago[deleted]
- pron 12y agoSpecifying the dependency in Maven XML has become sort of a standard that even Gradle people use. Obviously, Maven has been around much, much longer, and a lot more people are still using it, but more and more are switching to Gradle. At the very least Gradle has come to a point that you don't have to worry about it not being maintained, or that there won't be people to ask if you've got a question.
- bananas 12y agoThis. I can't see myself using Gradle any time soon. Literally everything I've touched is maven only and I don't want to learn another DSL on top of yet another language.
- smrtinsert 12y agoThere are no winners in the build war despite the overwhelming online support for Gradle. Personally I'm not a fan of it. I find it on the slow side even compared to maven. I'd rather have declarative builds like Ant but therefore support better tooling than super freeform tools like Gradle that force you to drop into a language with about as much type safety as Javascript. Multi-project builds are also annoying, as Gradle has to parse and validate all the connected projects before proceeding with one single task on the build you're invoking due to its design. Very annoying stuff.
- tieTYT 12y ago> I'd rather have declarative builds like Ant Is that a typo? I'd say Ant is the opposite of declarative.
- twic 12y agoIt's interesting. Ant is a somewhat constrained imperative language. Gradle is a highly constrained declarative language built on top of, and with an escape hatch to, a completely unconstrained imperative language. If you stay within the bounds of that the Gradle DSL can do, rather than throwing Groovy around (which is possible - i write a lot of Gradle, and very rarely write raw Groovy), then Gradle is rather nice and easy to reason about. But if you don't, well, you're going to have a bad time.
- oldmanjay 12y agoI've definitely found gradle to be faster than maven, particularly using the daemon, and even more so considering the extensive support for understanding when a task is up-to-date. I haven't run a clean task in gradle in several months, but in maven it seemed to be a crapshoot if the clean was required or not. That saves a lot of time.
- eeperson 12y agoThe performance problems are definitely the most annoying part of using Gradle. The Gradle daemon helped a little but tended to break other things and Gradle was still pretty slow. If you are looking for something faster and more declarative, you may want to check out SBT[0]. It is way faster than any of the other JVM build tools. Also, in the future[1] it should have much better tooling support than anything else on the JVM. [0] - http://www.scala-sbt.org/ http://www.scala-sbt.org/ [1] - https://github.com/sbt/sbt/wiki/Client-server-split https://github.com/sbt/sbt/wiki/Client-server-split
- jayd16 12y agoYou should be skeptical. Many Android projects don't use Gradle. Gradle itself might be stable but Gradle issues are at the top of every single Android Studio release notes. When that stops happening I'll start thinking about Gradle.
- EdwardDiego 12y agoYep, Maven is the defacto AFAICT. But so is Java 6 currently.
- java-lang 12y ago> I'm a little skeptical of this. The title did warn that it is an opinionated guide. I think most projects that used Maven before Gradle don't have enough incentive to migrate. A lot of the new projects, however, start out with gradle: Vert.x, Crate.io, RxJava.
- pswenson 12y agoI'd say Gradle is the least awful of the 3 major build systems. Ant degrades into an unmaintainable mess as soon as any complexity enters the system. XML is a horrible scripting language, simple imperative constructs are very awkward (loops/variables/conditionals). Maven also suffers from XML hell, but at least it has dependency management. I've used gradle extensively and it is quite difficult to figure out what is going on. Using a debugger would be nice, but it simply doesn't work. Gradle is terribly slow on a big project, the update checks are the main culprit. They should be done automatically in the background to alleviate this pain. Since gradle is compiled rather than interpreted, calling code in the project being built is difficult and convoluted. For example, if I want to call a DBUtil.cleanDB() method in my java code I can't reference DBUtil in my gradle script as it hasn't been built yet and the Gradle script won't compile. If gradle was interpreted this problem wouldn't exist.... I find the DSL unintuitive and the inability to specify the order of tasks execution is always a sore point. On the positive, at least it's a language, not XML. I have never understood the java world's obsession with XML and forcing it in directions never intended. This XML obsession has led to java being a major laggard in automation tech. Java devs do many things manually that a Ruby/Python dev would be horrified at....
- tieTYT 12y ago> Maven also suffers from XML hell, but at least it has dependency management. I don't find it that bad. The nice thing about it is how my IDE will auto complete almost everything and it should be possible to validate it without even using an IDE, as it has a schema. I agree with your complaints about Ant. The thing I was hoping gradle would give me is the ability to write tests for my build. EG: I want to have more confidence that my maven filtering is working the way I want it to. But it sounds like gradle isn't built with that in mind. Considering that groovy is dynamically typed, if my IDE doesn't auto complete (maybe it does) I think it's possible to make the argument that Maven is the least awful of the 3. At least the maven XML has a schema. I don't need yet another way to make a mistake in my build script (ie: typing issues). > Java devs do many things manually that a Ruby/Python dev would be horrified at.... Such as?
- eeperson 12y ago