PropertyResolver

class PropertyResolver(providers: PropertyResolver.SimpleProviderFactory, localPropertyProvider: (String) -> Provider<String>, localGradlePropertyProvider: (String) -> Provider<String>, startParameterProperty: (String) -> Provider<String>, globalLocalProperty: (String) -> Provider<String>, globalGradleLocalProperty: (String) -> Provider<String>)(source)

A property resolver that handles multiple property sources in a hierarchical fashion for providerFor.

This checks in the following order of priority

  • project-local local.properties

  • project-local gradle.properties

  • root-project local.properties

  • root-project/global gradle.properties

Constructors

Link copied to clipboard
constructor(providers: PropertyResolver.SimpleProviderFactory, localPropertyProvider: (String) -> Provider<String>, localGradlePropertyProvider: (String) -> Provider<String>, startParameterProperty: (String) -> Provider<String>, globalLocalProperty: (String) -> Provider<String>, globalGradleLocalProperty: (String) -> Provider<String>)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Functions

Link copied to clipboard
fun booleanProvider(key: String, defaultValue: Boolean = false): Provider<Boolean>
Link copied to clipboard
fun booleanValue(key: String, defaultValue: Boolean = false): Boolean
fun booleanValue(key: String, defaultValue: Provider<Boolean>): Boolean
Link copied to clipboard
fun intProvider(key: String, defaultValue: Int = -1): Provider<Int>
fun intProvider(key: String, defaultValue: Provider<Int>): Provider<Int>
Link copied to clipboard
fun intValue(key: String, defaultValue: Int = -1): Int
fun intValue(key: String, defaultValue: Provider<Int>): Int
Link copied to clipboard
Link copied to clipboard
fun optionalStringValue(key: String, defaultValue: String? = null): String?
Link copied to clipboard

Returns a "safe" property Provider mechanism that handles multiple property sources in a hierarchical fashion.

Link copied to clipboard
fun stringValue(key: String, defaultValue: String): String