Gradle Overview
Why is Gradle getting attention? First, understand what kind of tool Gradle is.
What is Gradle?
- Gradle is a build tool that can replace Maven.
- It uses a Groovy-based DSL (Domain Specific Language).
- Gradle is used by Spring open source projects and Android Studio.
Gradle Official Site
Why Gradle?
In Java, project management with build tools spread relatively early. Apache Ant, a build tool, appeared in 2000. After that, the more powerful Apache Maven appeared, and even today it can be called the de facto standard Java build tool.
Once a tool becomes established as the standard, it usually does not change easily. However, an exceptional event is happening in the world of build tools. The powerful rival that is breaking Maven’s dominance is software called Gradle.
Gradle is a build tool created based on the Groovy language. You may think, “Groovy? Isn’t that Java?” That is partly correct.
Groovy is a scripting language that runs on the Java Virtual Machine. Like Java, you write source code and run it on the Java Virtual Machine, but unlike Java, you do not need to compile the source code. Groovy is a scripting language and executes source code as-is. It is also compatible with Java, and Java class files can be used directly as Groovy classes. Its syntax is also very close to Java, so it feels like Java made easier to use. Some people even think of Groovy as a dialect of Java.
Gradle uses this “easy-to-use Java” called Groovy to write and run build processing.
If you have already used Maven, you will know that Maven defines build processing in XML. Simple content is fine, but when you need to write complex content, XML-based descriptions become quite difficult. As a Java programmer, it can also feel unsatisfying to have to use another language only for build management.
With Gradle, you can manage build processing by writing code that is almost like Java. This may be why Java programmers find it overwhelmingly easy to accept.