Javi
05/05/2025, 1:15 PMafterEvaluate as the workaround which is bad.Anze Sodja
05/05/2025, 1:25 PMJavi
05/05/2025, 2:35 PMif (someProp.get() == “
true) pluginManager.apply(…)
// later
someProp.set(false)
// the property was already checked in configuration phase and it is not going to be rechecked later to “un-apply” the plugin.Anze Sodja
05/05/2025, 2:51 PMJavi
05/05/2025, 2:52 PMPaul Merlin
05/07/2025, 11:19 AMPaul Merlin
05/07/2025, 11:19 AMafterEvaluate in some form. It's one of the topic we have on the short list of things we need to address next.Javi
05/07/2025, 11:20 AMJavi
06/27/2025, 12:11 PMafterEvaluate, and then I am getting an error from Kotlin Gradle plugin about KotlinPluginLifecycle.
Is there a way to apply a plugin directly if any action is invoked?
Currently I am doing something like
foo {
bar {
// bar is enabled
... // setup bar
}
}
Then in the plugin
afterEvaluate {
if (foo.bar.isEnabled.get()) { // true
pluginManager.apply(...) // crash
}
}
In the old setup without DCL, it was possible to apply everything when you call a block, so directly
fun bar(action: Action<Bar>) {
pluginManager.apply(...)
action.execute(bar)
}
But that is not possible with DCL, AFAIKJavi
06/27/2025, 12:12 PMPaul Merlin
07/02/2025, 3:23 PMJavi
07/02/2025, 3:25 PMPaul Merlin
07/02/2025, 3:28 PM