Live data from Hacker News

Why I Moved Back from Gradle to Maven

blog.philipphauer.de

101–110 of 172 posts

Re: Why I Moved Back from Gradle to Maven

#101
post #32

Flexibility is not something I want in a build system. I want predictability and simplicity. "Flexibility" just means that the dumbest guy on the project will find sufficient rope to hang the whole team sooner or later. That being said, "flexibility" is not special to Gradle. As long as there have been build systems there have been people who are too lazy to learn them and get "bright ideas". For instance I have no i…

> Flexibility is not something I want in a build system. [...] "Flexibility" just means that the dumbest guy on the project will find sufficient rope to hang the whole team sooner or later. We're on opposite sides here. I can control my team wrt rope and what not. But it's very hard to wrangle a build system to perform some advanced task you need without flexibility. I'd way rather have problems with the build system…

I've experienced this myself in a number of different environments. But I'm still not satisfied with the results with the more flexible tooling, usually. I think it's because they commonly lack scaffolding that I want a majority of the time.

The older I get, the more I realize that the lisp DSL approach is probably best: provide a simple, declarative walled garden. If I want to change something for my project using the full language, let me, and may the PR reviewers determine my fate. Ruby also seems to adhere to this philosophy, although I don't have a lot of experience with it.

Re: Why I Moved Back from Gradle to Maven

#102
I’m surprised nobody has mentioned buck or bazel in this thread.

At Addepar a few years ago, I transitioned a several-100-k LOC Java codebase from Gradle to buck. It was a fairly complex build including Jooq code gen.

Build times became much faster and flaky CI issues went away.

Today, I’d try Bazel— Buck only exists because ex-Google FB engineers had to recreate Googles amazing Blaze build system. Google has since released much of the original as open source, renaming to Bazel.

Maven and Gradle are both flaky, slow, and annoying to configure, in my experience.

Re: Why I Moved Back from Gradle to Maven

#103
post #98
post #66

Earlier quoted context omitted.

I guess I'd compile them like anything else: using Make to invoke the compiler. Checking versions can be accomplished by using awk or another tool to compare output from $compiler --version. What am I missing?

What if two things share a dependency?

Do you mean a conflicting dependency in one of my 5 projects? If so, it's on me to pay that technical debt and fix my own crap.

If the dependency doesn't conflict, then my package manager takes care of it.

Re: Why I Moved Back from Gradle to Maven

#104
post #91

Earlier quoted context omitted.

I think it's not correct to say that Turing-completeness somehow prevents extracting project structure. If a build tool can extract that information, why IDE could not do that? In fact this is how Gradle projects are imported into Intellij and Eclipse: Gradle builds project model by running Groovy or Kotlin scripts, and then IDEs are working with declarative model. The real problem is working with scripts themselves:…

To answer your question as to why an IDE can't do it, the reason is that in order to do it you need to solve the halting problem. Of course, the IDE can do it if you limit yourself to a subset that is not fully Turing complete, which is what IDEA does today. The issue a lot of people have with Gradle is that this subset is not well defined, and it's very easy to do something that works but will get the tools to have…

You're not wrong about the halting problem, but the reality is that most people do simple things that the IDE can extract a lot of information about. I.e. it doesn't have to understand a function to make the function fireable from a GUI button, and that is still actually quite useful.

Re: Why I Moved Back from Gradle to Maven

#105
Given that Gradle is here to stay... Can anyone share good resources for understanding Gradle?

With complex Makefiles, at least you have the sources and can try to understand the logic. With Gradle, it's all tons of compiled java code.

Re: Why I Moved Back from Gradle to Maven

#106
post #53

Earlier quoted context omitted.

I'm neither Maven nor Gradle ninja. Just a senior software developer with 15+ years of experience... > Maven requires a lot of boilerplate for everything. Copy-paste I think you may be doing it wrong. Maven supports declaring project-wide or module-wide entities and their attributes at every level. Duplication or copy-paste is a sign of not understanding Maven > Gradle... It's an environment for programmer To me this…

It may be you are doing plain simple (can be large, but still simple) projects for which Maven is perfectly fine. Gradle is for when you require some more complicated behaviour in your project. For example in my current project the applications are packaged into completely custom and proprietary package that is then being used by the completely custom automation to be deployed to the infrastructure. I have created a…

Can you supply an online tutorial of this approach using Gradle? ... I'm not sure what to google to find it myself (I don't use Gradle, but it sounds powerful).

Re: Why I Moved Back from Gradle to Maven

#107

Yo, new Gradle developer experience lead here. I fully empathize that it's much too difficult to wrap one's head around Gradle, so I want to share some things you might find interesting: * The Gradle Kotlin DSL, which is nearing production-readiness, substantially improves the assistance/docs one gets through the IDE. * However, the Kotlin DSL does not help with the large API surface and understanding of Gradle conce…

Using maven at work and Kotlin-DSL for my personal projects. One of the main pain points for using Kotlin DSL is the speed. It's order of magnitude slower than maven when used with IntelliJ IDE. Sometimes updating the `build.gradle.kts` file and reflecting the updates on IDE can take up to 5 mins. Apart from that really love the improvements made by Kotlin DSL. Finally, I can write the build script without going through the docs/stack overflow all the time.

Re: Why I Moved Back from Gradle to Maven

#108
post #32

Flexibility is not something I want in a build system. I want predictability and simplicity. "Flexibility" just means that the dumbest guy on the project will find sufficient rope to hang the whole team sooner or later. That being said, "flexibility" is not special to Gradle. As long as there have been build systems there have been people who are too lazy to learn them and get "bright ideas". For instance I have no i…

> Flexibility is not something I want in a build system. [...] "Flexibility" just means that the dumbest guy on the project will find sufficient rope to hang the whole team sooner or later. We're on opposite sides here. I can control my team wrt rope and what not. But it's very hard to wrangle a build system to perform some advanced task you need without flexibility. I'd way rather have problems with the build system…

You're assuming that you're around when the team is building out said system. What if you have the misfortune of inheriting a system where there was plenty of rope to go around?

Re: Why I Moved Back from Gradle to Maven

#109
post #90

Earlier quoted context omitted.

I don't spend a whole lot of time in the Java world, just enough to take care of small requests. So, I've only experienced maybe half of those. Could you explain a few killer reasons why Maven is the better build tool?

All maven builds are exactly the same (unless they force the tool to do otherwise), and files are always in well known locations.

How that's different in Gradle?

Re: Why I Moved Back from Gradle to Maven

#110
post #23
post #17

Earlier quoted context omitted.

Fix the documentation! Focus on Android Studio because that's the only place people really use Gradle because they are forced to do so. You need to create a LOT of Android Studio sample projects, and they need to be kept up to date for the various versions of Android Studio. If you did nothing but create "Hello World" in a zillion various flavors (Java, Kotlin, Scala, NDK, NDK with static library on different archite…

Please don't say that nobody uses Gradle outside of Android devs. We're a shop that definitely does zero Android development and we still use Gradle, the fact that people assume Gradle Anroid Dev is already a huge pain point for us when we start looking for third party educational resources.

At our shop we only care about Gradle, because Google forces ud to.

Otherwise we would keep using only Maven for Java projects.

Slower builds and higher hardware requirements for daemon and build cache are not worth it.

Post reply on HN