Gradle - System Property

Management

Get

System.properties['system']

Set

gradle.properties

Gradle - gradle.properties

systemProp.gradle.wrapperUser=myuser
systemProp.gradle.wrapperPassword=mypassword

Command line

Using the -D command-line option

gradle -q -Dkey=value

Build script

  • Kotlin
test.systemProperty('some.prop', 'value')
  • Groovy
test.systemProperty 'some.prop', 'value'

Documentation / Reference





Discover More
Gradle - Project Property

Project property is a type property that has a project scope You can access a project property in your build script simply by using its name as you would use a variable. Example: project property...
Gradle - Property

Properties are a way to define the environment of a build. Gradle has three different property scope: - java system property - project property - plugin property extra properties ...



Share this page:
Follow us:
Task Runner