conditional
fun ScriptScope.conditional(condition: ScopeActivationCondition = always, body: ConditionalScope.() -> Unit)(source)
A scoping function to execute a code block conditionally based on the declarative condition argument.
Parameters
condition
An optional activation condition for this scope. This can be used to declaratively specify under what conditions the scope should be evaluated. If the passed ScopeActivationCondition object evaluates to false, the entire scope will be ignored. The default value for this parameter is always.
body
The function body that will be executed in the context of the ConditionalScope instance.