Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

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.

settings.gradle may cotains following Properties.

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 a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

What is Gradle and use cases of Gradle?

What is Gradle? Gradle is an open-source build automation tool that is designed to be flexible, powerful, and highly customizable. It is often used for building, testing,…

Read More

What is Gradle and How it works? An Overview and Its Use Cases?

What is Gradle? Gradle is a popular choice for Java developers who want flexibility and performance in a build automation tool. Gradle is a modern automation tool…

Read More

Top 50 interview questions and answers of Gradle

Short description about Gradle Gradle is an open-source build automation tool that is designed to be flexible enough to build almost any type of software. Moving to…

Read More

Top Gradle interview questions and answers

What is Gradle build tool? Gradle is a build automation tool based on Groovy and Kotlin. It’s open-source and flexible enough to build almost any type of software….

Read More

What is Gradle DAG (Directed Acyclic Graph)?

What is DAG (Directed Acyclic Graph) In computer science and mathematics, a directed acyclic graph (DAG) is a graph that is directed and without cycles connecting the…

Read More

Gradle Interview questions and Answer Part 1

What are the parts of the task lifecycle? A. Configuration, Execution B. Initialization, Configuration, Execution C. Initialization, Configuration, Execution, Finalization D. Execution Ans: B. Initialization, Configuration, Execution…

Read More