Gradle Properties - Runtime and Project Configuration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 7: Line 7:
"Properties" in this context represent external configuration elements passed to a [[Gradle_Concepts#Build_Lifecycle|Gradle build]] to modify the behavior of the Gradle runtime itself, or the behavior of tasks being executed by various projects that are part of the build. Gradle supports many kinds of "properties". Configuration can be passed as command line flags, system properties, Gradle properties, environment variables and project properties. All these configuration elements are provided externally and injected into the build. It is also possible to define properties in the build scripts and pass configuration around between different elements of the build. Those properties are named "extra properties". Since build scripts may include executable code, it is also possible to use local variables, which are a feature of the underlying Groovy language.
"Properties" in this context represent external configuration elements passed to a [[Gradle_Concepts#Build_Lifecycle|Gradle build]] to modify the behavior of the Gradle runtime itself, or the behavior of tasks being executed by various projects that are part of the build. Gradle supports many kinds of "properties". Configuration can be passed as command line flags, system properties, Gradle properties, environment variables and project properties. All these configuration elements are provided externally and injected into the build. It is also possible to define properties in the build scripts and pass configuration around between different elements of the build. Those properties are named "extra properties". Since build scripts may include executable code, it is also possible to use local variables, which are a feature of the underlying Groovy language.


The external configuration and extra properties become part of the state of various objects of the build, such as [[Gradle Project#Overview|projects]] or [[Gradle Task#Overview|tasks]]. The state of the build's objects can be read from the build scripts.
The external configuration and extra properties become part of the state of various objects of the build, such as projects or tasks. The state of the build's objects can be read from the build scripts via dedicated accessors.  
 
The projects exposes coordinates such as name, group and version, then various other state such as the path





Revision as of 02:18, 5 October 2020

External

Internal

Overview

"Properties" in this context represent external configuration elements passed to a Gradle build to modify the behavior of the Gradle runtime itself, or the behavior of tasks being executed by various projects that are part of the build. Gradle supports many kinds of "properties". Configuration can be passed as command line flags, system properties, Gradle properties, environment variables and project properties. All these configuration elements are provided externally and injected into the build. It is also possible to define properties in the build scripts and pass configuration around between different elements of the build. Those properties are named "extra properties". Since build scripts may include executable code, it is also possible to use local variables, which are a feature of the underlying Groovy language.

The external configuration and extra properties become part of the state of various objects of the build, such as projects or tasks. The state of the build's objects can be read from the build scripts via dedicated accessors.

The projects exposes coordinates such as name, group and version, then various other state such as the path


Gradle Project Coordinates and State Properties

TO DEPLETE

Gradle_Variables_and_Properties
Gradle Project Properties