This message was deleted.
# community-support
s
This message was deleted.
it should only get executed when the plugin is actually applied
j
I think I want to achieve too much 😅. My goal was:
Copy code
tasks.register("myTask") {
    // apply the plugin
    
    // configure the plugin
    
    // run the task from the plugin
}
n
why would you use a task for the application/configuration of another plugin? you're mixing the configuration and execution phases of gradle
j
Yep 😕. What I wanted to achieve is to have a plugin that will be run only sometimes (basically the dependencies version check). So I don’t want to waste build time to apply and configure this plugin for every build if it is going to be used once in a while.
n
If it's a well-behaved plugin, it shouldn't incur must of an extra cost, so I wouldn't worry about it too much. gradle is very good with avoiding work if it can.
j
Great, thanks for explaining that! I admit I started worrying about it before even checking if it matters for the build time 😉 (and probably doesn’t matter as you suggest).