Gradle.properties: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 5: Line 5:
=Overview=
=Overview=


'gradle.properties' files are used to define properties.
'gradle.properties' files are used to define [[Gradle_Runtime_and_Project_Configuration#Overview|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|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.
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|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.

Revision as of 05:18, 5 October 2020

Internal

Overview

'gradle.properties' files are 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

Conventionally, this is where the version of the project is stored:

version=1.0-SNAPSHOT