1. Why Gradle ?
- Gradle is a tool for build automation.
- We can automate the compiling, testing, packaging, and deployment of our software or other types of projects.
- Gradle uses a Domain Specific Language (DSL) based on Groovy to declare builds.
- Groovy is a language for the Java Virtual Machine (JVM), such as Java and Scala.
- Gradle is an open source build automation system that builds upon the concepts of Apache Ant and Apache Maven and introduces a Groovy-based domain-specific language (DSL) instead of the XML form used by Apache Maven for declaring the project configuration.
- Gradle provides support for Java, Groovy, Scala, Web, and OSGi projects.
- We can write gradle build scripts in java, groovy, scala.
2. Advantages of gradle
- Incremental builds :
- This means tasks in a build are only executed if necessary.
- For example, a task to compile source code will first check whether the sources since the last execution of the task have changed. If the sources have changed, the task is executed, but if the sources haven't changed, the execution of the task is skipped and the task is marked as being up to date.
- Multi-project builds :
- Gradle has great support for multi-project builds.
- A project can simply be dependent on other projects. We can define a graph of dependencies between projects, and Gradle can resolve those dependencies for us. We have the flexibility to define our project layout as we want.
- Gradle has support for partial builds. This means Gradle will figure out if a project that our project depends on needs to be rebuilt or not. And if the project needs rebuilding, Gradle will do this before building our own project.
- Gradle wrapper :
- The Gradle wrapper allows us to execute Gradle builds, even though Gradle is not installed on a computer.
- This is a great way to distribute source code and provide the build system with it, so that the source code can be built.
- Open source :
- Gradle is an open source project and it is licensed under the Apache Software License (ASL).
No comments:
Post a Comment