Difference between Gradle and Maven?

MavenGradle

Maven Problem Overview


What is the difference between Gradle and Maven?

I am new to Gradle but I used to work with maven.

When to use Gradle and When to use Maven ?

Maven Solutions


Solution 1 - Maven

You can think of Gradle as goodness of Ant and Maven put together minus the noise of XML. And scriptability with groovy is very big plus.

  • Gradle gives you conventions but still gives you power to override them easily.
  • Gradle build files are less verbose as they are written in groovy.
  • It provides very nice DSL for writing build tasks.
  • Has lot of good plugins and vibrant ecosystem

> When to use Gradle and When to use Maven ?

Almost everywhere for creating java/groovy project. The build files are much terse.

With Google choosing Gradle as the new build system for Android SDK and mature libraries like Spring, Hibernate, Grails, Groovy etc. already using it to power their builds, there is no doubt that Gradle is becoming de-facto build system for the Java ecosystem.

Solution 2 - Maven

> Gradle is the next evolutionary step in JVM-based build tools. It draws on lessons learned from established tools like Ant and Maven and takes their best ideas to the next level. Following a build-by-convention approach, Gradle allows for declaratively modeling your problem domain using a powerful and expressive Domain-Specific Language (DSL) implemented in Groovy instead of XML. As Gradle is a JVM native, it allows you to write custom logic in the language you are most comfortable with, be it Java or Groovy

For more information here: Next generation builds with Gradle

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionVeeraView Question on Stackoverflow
Solution 1 - MavenkdabirView Answer on Stackoverflow
Solution 2 - MavenXelianView Answer on Stackoverflow