News for hackers. Stuff that matters.
Re:Gradle 7.0 by dvfjsdhgfv on Sunday April 11, 2021 @01:48PM (#26772088)
Sometimes I feel they should stop the development of all new features and concentrate exclusively on performance improvement (which, fortunately, is not neglected in this release).
Re:Gradle 7.0 by vbezhenar on Sunday April 11, 2021 @02:29PM (#26772362)
What features do you think they should not ship? Apple Silicon support obviously is necessary. Support for Java 16 is necessary. Centralized dependency management is long-awaited feature. Type safe project accessors are very nice to have.

I would say that they should not stop the development of all new features, but rather they should spend more time designing those features, so they don't have to change them in the future (making old variants obsolete and broken in the end). But modern software development is agile, move fast and break things and all that.

Re:Gradle 7.0 by avmich on Sunday April 11, 2021 @02:06PM (#26772200)
Even before that I'd prefer them improving the documentation :) . It's pretty senseless to have a system with even a good performance which can't be used because of a cryptic behavior.

I'm yet to see a good explanation for how Gradle should be used. Is knowing Groovy a prerequisite?

Re:Gradle 7.0 by jlund-molfese on Sunday April 11, 2021 @02:35PM (#26772399)
These days the Kotlin DSL is treated as a first class citizen and you can find examples for most common tasks in either language. But Groovy is pretty easy to pick up too, you definitely don't need to know it before you start using it with Gradle.

Aside from the performance implications, Gradle excels when used with more complex builds with many steps. If Maven works for your use case, your build scripts aren't unmanageably long, and your team doesn't mind XML, there isn't much of a reason to switch.

Re:Gradle 7.0 by scaladev on Sunday April 11, 2021 @02:15PM (#26772260)
These days you can write build scripts in Kotlin. It provides proper type checking and better auto-completion.
Re:Gradle 7.0 by vbezhenar on Sunday April 11, 2021 @02:31PM (#26772379)
I don't know which documentation do you miss. Gradle has pretty extensive documentation, stackoverflow has all kinds of answers and other websites have plenty of tutorials.

I don't know Groovy and I was able to write complicated enough multi-project builds with some custom build steps by copy-pasting snippets from the Internet and applying some common sense. I guess, Groovy knowledge is required if you need to write build plugins.

Re:Gradle 7.0 by vesinisa on Sunday April 11, 2021 @04:06PM (#26772975)
No, Gradle's documentation is really terrible. There is just no easy path to learn it - you will with time and pain learn a bit of the interface, but deep down it remains mostly unfanthonable, unnecessarily complex and filled with strange quirks. Bruce Eckel had pretty much the same experience as myself: https://www.bruceeckel.com/2021/01/02/the-problem-with-gradl...

Everone "learns" Gradle by copy-pasting snippets from the Internet and then having to fix them when they break. And what little I have learned of Gradle over the years was certainly not thanks to their documentation, but other people explaining the concepts in blog posts and tutorials. The Gradle documentation always assumes that you will want to learn the whole build system from ground up. There is no simple documentation for people who see Gradle just as a tool secondary to their actual product that is just built with it.

It is in many ways similar to git. You can't really learn git unless you learn it from the ground up. But git is actually really simple when compared to Gradle, and most people do learn git eventually through using it. But I am yet to encounter a developer who actually learned Gradle inside out just from using it and reading the documentation.

Oh, and at least git's interface and structure has remained mostly static ever since the original concept by Linus in 2005. Same can not be said of Gradle - I feel like the developer interface is like a sand castle that is washed away every second release, and I assume the internals keep shifting as well. What a nightmare to work with.

Re:Gradle 7.0 by njitbew on Sunday April 11, 2021 @04:11PM (#26773010)
This is funny, because I have the complete opposite experience. Yes, it took me an afternoon to find my way around Gradle. But ever since I really appreciate their documentation. It is to the point, well written, contains code samples (which I believe are unit-tested, so they the code samples are always up-to-date), contains examples in both Groovy & Kotlin, and I could keep going on. A good entry point, for example, is Build Script Basics (https://docs.gradle.org/current/userguide/tutorial_using_tas...).

> But I am yet to encounter a developer who actually learned Gradle inside out just from using it and reading the documentation.

You just met him! ;)

Re:Gradle 7.0 by Hackbraten on Sunday April 11, 2021 @04:44PM (#26773242)
One thing that keeps disappointing me is the utter lack of reference-style (API) documentation. Sure, the conceptual documents contain examples. But if the example isn’t clear enough, you’re completely on your own.

For example, the following document has been largely useless to me even though I’ve spent whole days trying to make the examples work for me: https://docs.gradle.org/current/userguide/cross_project_publ...

Re:Gradle 7.0 by fcurts on Sunday April 11, 2021 @07:36PM (#26774574)
Gradle has had reference-style API documentation for as long as I can think: https://docs.gradle.org/current/dsl/index.html
Re:Gradle 7.0 by vesinisa on Sunday April 11, 2021 @05:05PM (#26773420)
You are probably doing a bit simpler stuff, if that basic tutorial suffices you. I should have maybe added that I do Android development with Gradle. There you don't as much start with an empty build file to write the tasks to compile your project, but instead have to navigate a pre-existing large build file and figure how to correctly use the Google and Gradle interfaces to integrate to the Android build tools, such as the dreaded AGP (Android Gradle Plugin). Which by the way is actually mostly undocumnented AFAIK!
Re:Gradle 7.0 by njitbew on Monday April 12, 2021 @05:09AM (#26777330)
I know nothing about Android development with Gradle (or Android development in general, for that matter). I feel that is where a lot of negativity in this thread comes from. But then it's not per-se Gradle who is to blame; it's this specific use case of Gradle with Android which apparently is giving people a poor experience (e.g. lacking documentation).

> You are probably doing a bit simpler stuff, if that basic tutorial suffices you.

I've written a couple Gradle plugins, one of them was to build and test programs in our custom DSL. This exposed me to all facets of Gradle, because whatever Gradle offers to compile Java, Kotlin, ... you will most likely use for another language as well. I could not have written these plugins without the Gradle documentation. But again, it's totally unrelated to Android development.

Re:Gradle 7.0 by avmich on Sunday April 11, 2021 @05:11PM (#26773472)
The problem is not all developers have such a nice experience. Maybe the reason is underlying assumptions - they can really help in learning or become a really big obstacle, if one isn't aware of them. That or another, my several attempts to grok Gradle from existing scripts and documentation still fail to produce understanding.
Re:Gradle 7.0 by tootoon on Sunday April 11, 2021 @09:49PM (#26775391)
It is not possible to learn anything inside out that is bigger than 100 megabytes.
Re:Gradle 7.0 by lmm on Monday April 12, 2021 @12:13AM (#26776001)
The documentation I'm missing is: what tasks, sourcesets, etc. exist by default? Where are they defined? I don't want to do some kind of runtime introspection in a build environment shell to find out what the project build does, I want a static list of all the tasks and which depends on what.
Re:Gradle 7.0 by popotamonga on Sunday April 11, 2021 @03:06PM (#26772605)
I never understood why my android app with only 300 classes and 20 libs takes more than 1m to build on my custom 5k$ computer. In comparison i have a c# project 3x bigger and only takes a few seconds to fully rebuild.

Maybe its just how android is and nothing to do with graddle but still...

Re:Gradle 7.0 by ohgodplsno on Sunday April 11, 2021 @03:15PM (#26772677)
A lot of it is Android, yes. A regular build run will involve kotlin annotation processing, kotlin compilation, java annotation processing, java compilation, AAPT2, dexing, sometimes d8/r8 if you're in release mode, as well as a whole host of various processes that you can forget about until it hits you with a build error that will have you puzzled for a few hours.

EDIT: right, Jetifier too, because that's always a lot of fun.

Re:Gradle 7.0 by kaba0 on Monday April 12, 2021 @07:35AM (#26778228)
From experience, non-android java project will build roughly in the same time as comparable amount of C# code, with both maven and gradle. It is definitely android that increases it.
Re:Gradle 7.0 by okr on Sunday April 11, 2021 @01:49PM (#26772098)
Yup. I also stopped upgrading. Too much work.
Re:Gradle 7.0 by josteink on Sunday April 11, 2021 @02:36PM (#26772406)
Granted it was many years ago, but my only experience with Gradle was through Android Studio.

Basically, as I remember it, every time Android studio updated Gradle, my project broke. No exceptions, even though this was a stock Android Studio project.

Seemingly things are still that terrible? If so, why do you people keep using it?

What problems does Gradle solve which other build-systems don’t solve better

Re:Gradle 7.0 by ohgodplsno on Sunday April 11, 2021 @03:00PM (#26772566)
Gradle is sufficiently implanted into the Android ecosytem that moving away is hard. When you have a project with 80+ modules, buildSrc contents, gradle plugins, well, moving to Bazel isn't exactly a one day job. Add to that that many things add Gradle plugins that might be necessary for your workflow, and well, you're in a bad state.
Re:Gradle 7.0 by thu2111 on Sunday April 11, 2021 @05:36PM (#26773673)
Unfortunately that's also now the case for the Kotlin ecosystem. I attempted to use Maven recently for a simple Kotlin project and recently switched to Gradle. This is NOT because I like Gradle. Oh god if there is any project and company that badly needs some competition it is Gradle Inc. But the Maven/Kotlin ecosystem is bit-rotting. Maven itself is hardly maintained. It's now common to find libraries or tools that only really work properly with Gradle and de-prioritise Maven related issues. Gradle is winning by default, even though it's arguably a step sideways from Maven.