News for hackers. Stuff that matters.
Re:Exodus: Easily migrate your JVM code from Maven to Bazel by Jakobeha on Tuesday April 06, 2021 @09:33PM (#26719573)
Also, how does Bazel compare to Gradle?

JetBrains and it seems basically every library has support for Gradle and sometimes Maven, but not Bazel. Gradle is verbose and has a really steep learning curve, but it's battle-tested and does its job really well. I don't really see why anyone would use Bazel instead.

Re:Exodus: Easily migrate your JVM code from Maven to Bazel by izacus on Wednesday April 07, 2021 @05:35AM (#26722367)
I think they're fundamentally opposed in their philosophy.

Gradle: Just slap any kind of code into our build files and we'll run it. Everything is code, everything is customizable and you can muck around with everything.

Bazel: Here are a few of build rules. All compilation needs to be deterministic, all tasks need clear deterministic outputs and all task generate clear deterministic outputs. It's very rigid and it uses that to get significant performance wins, especially when using a build farm.

Re:Exodus: Easily migrate your JVM code from Maven to Bazel by kaba0 on Monday April 12, 2021 @09:46AM (#26779349)
That’s absolutely not what Gradle is. Gradle only provides a DSL that is supposed to be used to describe the build process deterministically, and add some configurable scripting on top.

For anything more complex, you should write plugins.

Nonetheless, I would be interested in seeing a detailed comparison of the two. As far as I know, gradle is quite capable once someone understands what he/she does.

https://melix.github.io/blog/2021/01/the-problem-with-gradle...

Re:Exodus: Easily migrate your JVM code from Maven to Bazel by Rebelgecko on Tuesday April 06, 2021 @11:10PM (#26720182)
For the most part, I think you've got it.

A gradle build can be very complicated and very long.

Bazel is relatively easy to learn and relatively concise (again that's relative to Gradle which for a Java dev basically requires you to learn 1-2 new languages if you want to understand the build file syntax), and IMO is MUCH better if you are working with multiple languages.

However I haven't tried to use Bazel with things like native libs in the JVM... so it's possible that my Gradle opinion is biased because I used it with more complicated use cases.

Re:Exodus: Easily migrate your JVM code from Maven to Bazel by jen20 on Wednesday April 07, 2021 @09:57AM (#26725038)
The Bazel plugin for IntelliJ works rather well - I’ve used it for Python and Go quite extensively and it “just works”. I assume this is the case for Java too (though have not verified). The main issue is that releases often lag IntelliJ releases by a not-insignificant amount since they’re (I think) done by Google and not JetBrains.
Re:Exodus: Easily migrate your JVM code from Maven to Bazel by jvolkman on Wednesday April 07, 2021 @10:42AM (#26725624)
Correct. That plugin is developed by Google primarily as internal dev tooling, and the version of IntelliJ supported internally is generally not bleeding edge.
Re:Exodus: Easily migrate your JVM code from Maven to Bazel by btbuilder on Tuesday April 06, 2021 @10:17PM (#26719863)
Gradle’s remote build cache which caches at the task level is nice and granular. Also we’ve never had a problem with a change requiring a rebuild not being detected.

One thing that Bazel has that I wish gradle did was remote compilation and remote test execution rather than just remote caching of artifacts.