# gradleProperty

abstract fun gradleProperty(propertyName: String): Provider<String>(source)
abstract fun gradleProperty(propertyName: Provider<String>): Provider<String>(source)

Creates a Provider whose value is fetched from the Gradle property of the given name.

The property value is resolved from the following sources, in order of priority:

1. Command-line project properties (`-P` arguments)
2. System properties with the `org.gradle.project.` prefix
3. Environment variables with the `ORG_GRADLE_PROJECT_` prefix
4. `gradle.properties` in the Gradle User Home directory
5. `gradle.properties` in the build root directory
6. `gradle.properties` in the Gradle installation directory

Note that this method resolves properties at the build level. It does not include properties from `gradle.properties` files in subproject directories, nor does it include extra properties or other properties set dynamically on individual org.gradle.api.Project instances.

More information on project properties.

#### Return

the provider for the Gradle property, never returns null

#### Since

6.2

#### Parameters

propertyName

the name of the Gradle property