Configuration
Summary
Most of the configurations are hooked up to flow downstream to the eventual task configurations in the priority order, where each layer looks up the chain for default value if an explicit value is not configured for it. This allows setting default values for a lot of downstream configurations once and overriding them only where needed.
Configuration Layers
The configuration values are resolved in the following descending priority order:
-
- CLI options (
--arg=value
) - System properties (
-Dprop=value
) - Gradle properties (
-Pprop=value
,ORG_GRADLE_PROJECT_prop=value
env variable,-Dorg.gradle.project.prop=value
system property orprop=value
stored ingradle.properties
file) - Env variables (
PROP=value
)
- CLI options (
- Package / Registry
- Tasks
Important
The layering only works for properties that have no explicit values set via the DSL as doing so overrides any layering or default behaviour.