Gradle.properties: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
* [[Gradle_Variables_and_Properties#.27gradle.properties.27_Files|Gradle Variables and Properties]]
* [[Gradle_Variables_and_Properties#.27gradle.properties.27_Files|Gradle Variables and Properties]]
* [[Gradle Configuration#gradle.properties|Gradle Configuration]]
* [[Gradle Configuration#gradle.properties|Gradle Configuration]]
=Overview=
'gradle.properties' files are also used to define properties. There are two kinds of 'gradle.properties' files. If both files are present, their content is merged and the configuration that comes from the user home directory takes precedence over the configuration that comes from the project root directory. Form a security perspective, it makes sense to use the user home directory if the project is checked into a repository and we do not want to maintain sensitive information in that file. The project root gradle.properties is important because it can be stored in source control, so the entire team working on the project can share the same configuration.
=Gradle User Home gradle.properties=
This file is  stored in Gradle user home directory ~/.gradle/gradle.properties, conventionally referred to as GRADLE_USER_HOME.
=Project Root gradle.properties=

Revision as of 00:32, 22 March 2019

Internal

Overview

'gradle.properties' files are also used to define properties. There are two kinds of 'gradle.properties' files. If both files are present, their content is merged and the configuration that comes from the user home directory takes precedence over the configuration that comes from the project root directory. Form a security perspective, it makes sense to use the user home directory if the project is checked into a repository and we do not want to maintain sensitive information in that file. The project root gradle.properties is important because it can be stored in source control, so the entire team working on the project can share the same configuration.

Gradle User Home gradle.properties

This file is stored in Gradle user home directory ~/.gradle/gradle.properties, conventionally referred to as GRADLE_USER_HOME.

Project Root gradle.properties