Gradle Core Concepts
A project represents a thing that is to be done, like deploying applications to staging environments. A Gradle project requires a set of tasks to execute.
A task refers to a piece of work performed by a build. It might be something as simple as compiling classes, creating JAR files, making Javadoc, or publishing some archives.
A build script is known as build.gradle and is located in the root directory of the project. Every Gradle build comprises one or more projects.
Features of Gradle
Gradle quickly finishes the task by considering the outputs from the previous executions. The jobs whose inputs are changed are the only ones that are executed. This helps in avoiding unnecessary tasks and yields higher performance.
Gradle provides an incremental build that states it executes the tasks that are only necessary. If we run any source code, Gradle first checks if that source code has gone through any previous execution. If the code has some changes, it will then be executed, but if there are no changes, then it will skip the execution of that code.
We relate the term build scans to providing information about build run used to identify any build issues. They are concerned with any problems with the build’s performance, and these scans are extremely worthy especially for fixing an issue with the build.
Known to provide support, we use Gradle for ANT build projects. Tasks can be imported from ANT build projects and can be reused in Gradle.
Gradle also supports Maven repositories that are made to publish and fetch dependencies of the project.
Multi-Project Build Software
Gradle ensures magnificent support for multi-project builds. These projects can contain a root project and any number of subprojects.
Gradle supports partial builds, which states that the tool will determine if a project on which our project depends, needs any kind of rebuilding. In case the project needs rebuilding, Gradle will do that before building any further projects.