MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

What is settings.gradle in Gradle?

A gradle build has three important files. build.gradle, gradle.properties and settings.gradle

Gradle build lifecycle consist of three phases: initialization, configuration, and execution. settings.gradle get evaluated in the initialization phase.

  • Gradle looks at the settings.gradle file in order to identify the different projects. At the end of the initialization phase, Gradle creates an instance of org.gradle.api.Project corresponding to each of these projects.
  • The settings.gradle file is a Groovy script, just like the build.gradle file. Only one settings.gradle script will be executed in each build (in comparison to multiple build.gradle scripts in multi-project builds).
  • The settings.gradle script will be executed before any build.gradle script and even before the Project instances are created. Therefore, it is evaluated against a Settings object.

settings.gradle is very important in multi-module projects.

Gradle multi-module project layout and settings.gradle with rootProject.name and include sub-a, sub-b

settings.gradle may cotains following Properties.

Table of settings.gradle properties such as buildCache, gradle, plugins, rootDir and rootProject
PropertyDescription
buildCacheThe build cache configuration.
extensionsThe container of extensions.
gradleThe Gradle instance for the current build.
pluginManagerThe plugin manager for this plugin aware object.
pluginsThe container of plugins that have been applied to this object.
rootDirThe root directory of the build. The root directory is the project directory of the root project.
rootProjectThe root project of the build.
settingsReturns this settings object.
settingsDirThe settings directory of the build. The settings directory is the directory containing the settings file.
startParameterThe set of parameters used to invoke this instance of Gradle.

settings.gradle may cotains following Methods.

Methods

MethodDescription
apply(closure)Applies zero or more plugins or scripts.
apply(options)Applies a plugin or script, using the given options provided as a map. Does nothing if the plugin has already been applied.
apply(action)Applies zero or more plugins or scripts.
buildCache(action)Configures build cache.
findProject(projectDir)Returns the project with the given project directory.
findProject(path)Returns the project with the given path.
include(projectPaths)Adds the given projects to the build. Each path in the supplied list is treated as the path of a project to add to the build. Note that these path are not file paths, but instead specify the location of the new project in the project hierarchy. As such, the supplied paths must use the ‘:’ character as separator (and NOT ‘/’).
includeBuild(rootProject)Includes a build at the specified path to the composite build.
includeBuild(rootProject, configuration)Includes a build at the specified path to the composite build, with the supplied configuration.
includeFlat(projectNames)Adds the given projects to the build. Each name in the supplied list is treated as the name of a project to add to the build.
project(projectDir)Returns the project with the given project directory.
project(path)Returns the project with the given path.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Develocity: The Complete Beginner-to-Advanced Tutorial

A practical self-study course covering Developer Productivity Engineering, Build Scan, Build Cache, build acceleration, test optimization, architecture, deployment, integrations, security, and enterprise operations. 28 chapters | Beginner…

Read More

Gradle Training Curriculum: Hands-On Learning Path for Build and DevOps Engineers

A revised, practical Gradle training guide based on the original course outline. It maps the agenda to hands-on labs, CI workflow, and team-ready build practices.

Read More

Sonatype Nexus Repository Manager: A Practical DevOps Introduction

Sonatype Nexus helps teams centralize dependency downloads and internal artifact publishing. This guide shows how Nexus fits into CI/CD, when to use hosted/proxy/group repos, and how to configure common build clients.

Read More

Gradle for DevOps: Core Concepts, Build Workflow, and Practical Examples

Gradle is a flexible build automation tool used to compile, test, package, and publish software in repeatable pipelines. This guide explains how Gradle works, how it compares with Maven and Ant, and how to start with practical commands.

Read More

Advanced Features of Smart Build Tools for Faster, Reproducible CI/CD

Smart build tools do much more than compile code: they cache, parallelize, enforce dependency rules, and improve reproducibility. This guide compares common options and shows practical commands you can use in real pipelines.

Read More

Gradle Training in Pune: Learn Modern Build and Dependency Management

Introduction Build automation has become a core requirement in modern software development. As applications grow larger and teams work faster, managing builds manually becomes slow, error-prone, and…

Read More