CHAPTER 1
Gradle is an open-source build automation system that was conceived upon a Groovy-based[1] domain-specific language[2] (DSL). Gradle was designed for multi-project builds, which can grow to be quite large. It supports incremental builds by intelligently determining which parts of the project are up-to-date, so that any task dependent upon those parts will not be re-executed.
The initial release of Gradle was published in 2007, and the project is considered to have active development status. The current stable release (at the time of writing) was published in March of 2016.
Gradle is being heralded as more than a build tool, but also as a means for automating the compilation, test, and release process. Qualified by its developers as a quantum leap for building technology in the Java world, some of Gradle’s features are:
Since Gradle’s main focus is Java projects, the team members for those projects are very familiar with Java. Gradle developers thought that a build script should be as transparent as possible to all team members. They didn’t use Java because its limitations prevent a nice, expressive, and powerful build language.
Groovy was chosen because it provides the greatest transparency for Java people. Its base syntax is the same, as well as its type system and other things. Thus, every Gradle build file is an executable Groovy script. For Gradle beginners, being aware that they’re writing Groovy code is not needed. But when your needs become more sophisticated, the power of the Groovy language may become very important. In that way, Gradle’s Groovy-based build files allow the users to do general-purpose programming tasks in their build file, offering control flow and execution of nonstandard tasks within the build process.
At some point, every developer who has been maintaining a complex build wants to write a little bit of code for a build file. Sometimes, the unlimited ability to code a build according to the user-desired way can result in a catastrophe of maintainability. Although Gradle build files are Groovy scripts, Gradle itself intends to present the user not with mere Groovy, but with a domain-specific language (DSL) oriented to the task of building code. So a new Gradle user could learn this language with no previous knowledge about Groovy, and use Gradle effectively. This DSL describes the build using idioms appropriate for performing the task of building software, and not necessarily for general-purpose programming. In this way, Gradle gently nudges the user toward using the idioms of its DSL first, even when general-purpose coding is always available.
Gradle Inc. is a Silicon Valley startup that develops, distributes, and supports the Gradle open-source project. Its mission statement is “to transform how software is built and shipped.” Also, it claims to exist “to end once-and-for-all the worst things about big software and restore the reason the user got into coding in the first place.”
Besides supporting Gradle, the company offers services related to Gradle, build automation, and continuous integration pipelines. According to its website, some of these services are:
Gradle is an open-source build automation system that is conceived upon a Groovy-based domain-specific-language (DSL). Gradle was first released in 2007, and the project is considered to have an active development status. This e-book uses release 2.12, published on March 14, 2016.
Gradle is being heralded as a build tool, and also a tool for automating the compilation, test, and release process. Gradle’s main focus is Java projects, and for that reason its developers chose Groovy because it provides the greatest transparency for Java people. Its base syntax is the same, as well as its type system and other things.
Although Gradle build files are Groovy scripts, Gradle itself intends to present the user not with mere Groovy, but with a domain-specific language (DSL) specifically oriented to the task of building code. So a new Gradle user could learn this language with no previous knowledge of Groovy, and use Gradle effectively.
Gradle Inc. is a Silicon Valley startup that develops, distributes, and supports Gradle. It offers services around Gradle, build automation, and continuous integration pipelines.