- Home
- Interview Questions
- DevOps
A daemon is a computer program that runs as a background process, ratherthan being under the direct control of an interactive user.
Gradle runs on the Java Virtual Machine (JVM) and uses several supportinglibraries that require a non-trivial initialization time.
As a result, it can sometimes seem a little slow to start. The solution to thisproblem is the Gradle Daemon: a long-lived background process thatexecutes your builds much more quickly than would otherwise be the case.
We accomplish this by avoiding the expensive bootstrapping process aswell as leveraging caching, by keeping data about your project in memory.
Software projects rarely work in isolation. In most cases, a project relies on reusablefunctionality in the form of libraries or is broken up into individual components to compose amodularized system.
Dependency management is a technique for declaring, resolving and using dependenciesrequired by the project in an automated fashion.
Gradle has built-in support for dependency management and lives up the task of fulfillingtypical scenarios encountered in modern software projects.
Here are some of the benefits of Gradle daemon
1. It has good UX
2. It is very powerful
3. It is aware of the resource
4. It is well integrated with the Gradle Build scans
5. It has been default enabled
Multi-project builds helps with modularization. It allows a person to concentrate on one areaof work in a larger project, while Gradle takes care of dependencies from other parts of theproject
A multi-project build in Gradle consists of one root project, and one or more subprojectsthat may also have subprojects.
While each subproject could configure itself in complete isolation of the other subprojects, itis common that subprojects share common traits.
It is then usually preferable to share configurations among projects, so the sameconfiguration affects several subprojects.
Gradle Build Tasks is made up of one or more projects and a project represents what isbeen done with Gradle.
Some key of features of Gradle Build Tasks are:
1. Task has life cycled methods [do first, do last]
2. Build Scripts are code
3. Default tasks like run, clean etc
4. Task dependencies can be defined using properties like dependsOn