What is the main reason for Java and Android using Gradle or Maven

The other Build Tools like GNU Make or Ninja, use the build model with rules and targets, so the build process is clear. But Gradle and Maven will not explicitly specify rules and targets, and generate the tasks automatically.
So what is the main reason, like Java always using many central lib, or scalability。

Don’t forget Ant with Ivy.

I always preferred Ant over Maven as you had more control over your build and could more easily make a build so what you need.
It is more like Make in that you have to specify each and every step to do.

But this makes build files very verbose and long and you have to copy many things around between projects and update many places if you found an error in your logic or need something new.

Maven and Gradle instead follow the convention-over-configuration approach which makes builds more uniform, maintainable, and understandable. Most projects that are using Maven or Gradle are structured the same and have the same tasks and a new person immediately knows how it works and where to find what. Gradle vs. Maven is simply much better and faster, much easier to extend, and much easier to still make it do what you want it to do which can get quite cumbersome quite fast with Maven. But you still control which things are possible in a build by applying and configuring the plugins you want and how you want them.

But if you want a more Make-like experience, you can also use Ant+Ivy.

1 Like