We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Configuring
@Configuring only supports one Action<T> param:
Action<T>
@Configuring public fun bar(action: Action<Bar>) { action.execute(bar) }
I would like to add a parameter to enable/disable a configuration:
@Configuring public fun bar(enabled: Boolean = true, action: Action<Bar>) { bar = enabled action.execute(bar) }
If I set that property manually in .dcl, it is too late and it keeps false even when it should be enabled, some samples:
.dcl
false
// does not work foo { bar { enabled = true // too late as I am configuring `foo` ... } }
// works foo { barEnabled = true // it uses `bar.enabled` under the hood (*) bar { ... } } // (*) @Restricted public abstract class Foo { @get:Nested public abstract val bar: Bar @get:Restricted public var barEnabled: Boolean get() = bar.enabled set(value) { bar.enabled = value } //... }
Ideally, I would like to do:
// 1. foo { bar(enabled = true) { ... } } // 2. foo { bar { // same as above as default param is `true` ... } } // 3. foo { bar(enabled = false) { ... } }
I tried @Adding too with no luck.
@Adding
The text was updated successfully, but these errors were encountered:
No branches or pull requests
@Configuring
only supports oneAction<T>
param:I would like to add a parameter to enable/disable a configuration:
If I set that property manually in
.dcl
, it is too late and it keepsfalse
even when it should be enabled, some samples:Ideally, I would like to do:
I tried
@Adding
too with no luck.The text was updated successfully, but these errors were encountered: