JsonObject

abstract class JsonObject<T : Any> : WithGradleFactories

Generic json object container supporting extra properties and Gradle serialisation

Constructors

Link copied to clipboard
fun JsonObject()

Functions

Link copied to clipboard
infix fun String.by(value: T)

Set a custom value for this JsonObject

Link copied to clipboard
open fun finalise(): MutableMap<String, T>

Resolves the underlying json value to a MutableMap instance, recursively merging known and custom properties and resolving all Provider values

Link copied to clipboard
fun json(value: GenericJsonObject.() -> Unit): GenericJsonObject
fun json(value: Action<GenericJsonObject>): GenericJsonObject

Build a custom object value

Link copied to clipboard
operator fun set(key: String, value: T)

Set a custom value

operator fun set(key: String, value: Provider<T>)

Set a custom value provider to be resolved when finalise is invoked

Inheritors

Link copied to clipboard