getProperty

inline fun <T> Project.getProperty(key: String, defaultValue: T? = null): T?

Retrieves a property from gradle.properties and converts it to the specified type.

Parameters

key

The property key to retrieve.

defaultValue

The default value to return if the property is not found or has an incompatible type.

Throws

if the property is not found or has an incompatible type.