Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 1.16 KB

File metadata and controls

23 lines (16 loc) · 1.16 KB

subkt / myaa.subkt.tasks / org.gradle.api.Task / getAs

getAs

inline fun <reified T> Task.getAs(propertyName: String): Provider<T>! (source)

Searches for the given property in the Subs object's SubProperties instance, evaluates its value using evaluate, and returns a single string, cast to the given type using String.asType, assuming that the resulting list contains only one element.

This function is run in a task context, using the entry and release values for this task.

// from task mux.03
// property file: TV.03.value=10
getAs<Int>("value")
// Output: 10 (type: Int)

Parameters

propertyName - The property to find.