Gradle Configuration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 44: Line 44:
{{Internal|gradle.properties#Overview|gradle.properties}}
{{Internal|gradle.properties#Overview|gradle.properties}}


==$HOME/.gradle==
==<span id='.24HOME.2F.gradle'></span>Gradle User Home==


The default [[Gradle_Concepts_ToDeplete#Gradle_User_Home|Gradle user home]].
The default [[Gradle_Concepts_ToDeplete#Gradle_User_Home|Gradle user home]].

Revision as of 22:42, 19 May 2018

Internal

Overview

Files and Paths

Gradle Home

If Gradle was installed with Homebrew on Mac, then the Gradle home is

/usr/local/Cellar/gradle/<version>/libexec

Gradle Project Files

.
|
|- build.gradle
|- settings.gradle
|- gradlew
+- gradle
      |
      +-wrapper
           |
           +- ...

build.gradle

The project-level configuration script that contains task configuration for the current project. For more details:

build.gradle

settings.gradle

This file specifies how the project and sub-projects are structured.

settings.gradle

gradle.properties

gradle.properties files can be placed either in Gradle user home directory or in the project root directory. The configuration that comes from the user home directory takes precedence over the configuration that comes from the project root directory.

gradle.properties

Gradle User Home

The default Gradle user home.

Build Environment Configuration

https://docs.gradle.org/current/userguide/build_environment.html

Gradle behavior is influenced by configuration provided with one or more of the following configuration mechanisms, listed below in the descending order of their precedence:

Command-Line Flags

Gradle Command-Line Interface

System Properties

System properties are stored in a gradle.properties file.

Gradle Properties

Gradle properties are "org.gradle.*" system properties. They are typically stored in a gradle.properties in the project root directory or in Gradle user home.

Environment Variables

Project Properties