Getting to know Gradle — Choice

Rodrigo Mendes
2 min readAug 20, 2018

--

If you are a developer, the automatization of your project is part of your day-to day. Don´t you want to treat your build code as any other piece of your software that can be extended, tested, and maintained? Let´s put the engineering of software back to Build. Gradle creates scripts that are declarative, readable, and clearly expresses your intention. Writing code in Groovy instead of in XML, using Gradle´s philosophy of build-by-convention reduced significantly the size of a construction script and is much more readable, as show in next figure.

Comparing scripts between Gradle and Maven (https://solidsoft.files.wordpress.com/2015/03/spock-groovy-maven-gradle.png)

It´s incredible to see the quantity of code that you need to write in Gradle to reach the same objective. With Gradle you do not need to make concessions. Where other compilation tools such as Maven propose a layout for the project which are “in my way”, the Gradle DSL allows flexibility, adapting the non-conventional project structures.

“Never change a working system” is what we always hear, isn´t it? Your team has already spent a lot of time creating the code infrastructure for the Build of your project. Gradle will not force them to migrate completely all of your existing construction logic. A good integration with other tools such as ANT and Maven is on the top of the Gradle priority list.

The market seems to be taking notice of Gradle. Open code projects such as Groovy and Hibernate completely changed to Gradle as the spine for its creation. All of the Android projects come with Gradle as the standard compilation system. Gradle also had an impact over the commercial market. Companies such as Orbitz, EADS, and Software AG embraced Gradle, to name a few. VMware, the company behind Spring and Grasil performed significant investments in choosing Gradle. Many of its software products, such as the framework Spring and Grails, is literally built over the trust that Gradle can deliver.

Gradle Architecture

--

--