api / org.gradle.api / Project / setProperty
setProperty
abstract fun setProperty(name: String, @Nullable value: Any): Unit
Sets a property of this project. This method searches for a property with the given name in the following locations, and sets the property on the first location where it finds the property.
- The project object itself. For example, the
rootDir
project property.
- The project's Convention object. For example, the
srcRootName
java plugin property.
- The project's extra properties.
If the property is not found, a groovy.lang.MissingPropertyException is thrown.
Parameters
name
- The name of the property
value
- The value of the property