Package dev.petuska.gradle.kotlin.delegates

Types

Link copied to clipboard
typealias GLazy<T> = Provider<T>

Read-only lazy gradle value

Link copied to clipboard
typealias GMutableLazy<T> = Property<T>

Read-write lazy gradle property

Link copied to clipboard
interface GStrictLazy<T : Any> : Provider<T>

Non-nullable read-only lazy gradle value

Link copied to clipboard
interface GStrictMutableLazy<T : Any> : GStrictLazy<T> , Property<T>

Non-nullable Read-write lazy gradle property

Link copied to clipboard
interface WithGLazy

A scoping interface providing GLazy delegate access functions

Link copied to clipboard
interface WithGLazyFactory : WithGLazy

Extended version of WithGLazy providing additional DSL for customised GLazy fallbacks using providerFactory.

Functions

Link copied to clipboard
fun <T : Any> WithGLazyFactory.gLazy(value: () -> T): GLazy<T>

Builds an instance of GLazy

Link copied to clipboard
inline fun <T : Any> WithGLazyFactory.gMutableLazy(initial: T? = null): GMutableLazy<T>

Builds an instance of GMutableLazy

Link copied to clipboard
fun <T : Any> GMutableLazy<T>.strict(): GStrictMutableLazy<T>

Boxes given GMutableLazy into GStrictMutableLazy which throws an error on delegate access if no value is present and prevents setting null values on delegate assignments.

fun <T : Any> GLazy<T>.strict(): GStrictLazy<T>

Boxes given GLazy into GStrictLazy which throws an error on delegate access if no value is present