Gradle and Maven

Gradle and Maven

Gradle and Maven


The world of build tools evolve from simple compilation (gcc) to make files, then evolution of ant(+ivy) and Maven, now the latest build tool is Gradle.Its always a puzzle which build tool to choose maven, gradle or both (maven and gradle). Sometime its first time project setup or could be migration from existing tool but it always a debate to choose one of the existing one.There have been lot of talks and discussion on Gradle, maven (and/or Gradle vs maven). There are Buzz around that Android/google adopted Gradle as its standard build tools.
Here, i would like to explore the possibilities of adopting Gradle or maven (Or Both), Intentionally i am keeping ant+ivy out of this talk.Lets take a look in details on why android adopted gradle.

Key points for the google to go ahead with gradle for their android development are

  • Create multiple APKs for your app with different features using the same project.(create several variants of an application)
  • Reuse code and resources.
  • Customize, configure, and extend the build process.
  • Customized integration with their own IDE Android Studio.
  • Single build tools to support multiple languages.

They had some special requirements for their diverse eco system, they worked with gradleware development team to include customized feature for the android application. They even have customized IDE for android Developers build around gradle.


What are we may be looking from Build tools

  • How easy is the learning curve?
  • How fast are different builds with each tool?
  • How complex is it to create and maintain the build script?
  • How many plugins exist and how simple is it to customize your own plugins?
  • How good is the community and documentation for each tool?
  • How well does each tool integrate with developer tools? (IDE, App Server, CI server).

One can decide on the basis of their use case and requirement.

Choices

  • Gradle

You may not be using other features which is used by google for android development as those features may or may not match with your needs however gradle is essentially emerging as popular tool and you may definitely want to have a look at it. It is flexible because it is DSL and it may change over the time. Build script may also needs to be changes with new version.

  • Maven

Maven is widely used in most of the companies and have robust defined workflow around it. Developers are very much familiar with the system. it is xml based standard configuration which is static.

  • Maven and Gradle (Both)

This would be the one more option for a company with wide range of development area which may give developers flexibility to adopt tool as per their choice with in given workflow.

References - https://www.scmtechblog.net/2015/03/gradle-or-maven-dilemma.html

https://devops.com/2015/03/27/puzzle-gradle-maven/

Giriraj Gujar

DevOps | Engineer @ Visa | CKAD

9 年

very nice article

回复

要查看或添加评论,请登录

社区洞察

其他会员也浏览了