Properties
Summary
Most of the configuration options are set to be configurable via various CLI inputs and follow a configuration layers order. Such CLI properties can be passed in four different ways - Gradle CLI Options, System Properties, Gradle Extra Properties, Gradle Properties and Environment Variables.
Gradle CLI Options
Gradle CLI options are only available for the tasks and can be passed in by specifying their keys prefixed with double
hyphens (--
) right after the task name.
Boolean properties can omit the value when representing true
states.
/bin/bash | |
---|---|
System Properties
System properties are only available for the configurations and can be passed in by specifying their keys prefixed
with -D
anywhere on the command line.
Boolean properties can omit the value when representing true
states.
/bin/bash | |
---|---|
Gradle Extra Properties
Gradle extra properties are only available for the configurations and can be passed in via extra
project extension.
This can be useful for multi-module builds that needs to configure other modules from submodules.
Boolean properties can omit the value when representing true
states.
build.gradle.kts | |
---|---|
Gradle Properties
Gradle properties are only available for the configurations and can be passed in by specifying their keys prefixed
with -P
anywhere on the command line or via the gradle.properties
file.
Boolean properties can omit the value when representing true
states.
Environment Variables
Environment variables are only available for the configurations and can be passed in by specifying their uppercase keys
in the current process's environment.
Boolean properties can omit the value when representing true
states.