How to configure a plugin after applying it in another plugin?

I want to do this (i.e. configure the war plugin to use a different archive name) except that I want to do it in another plugin,, not in a build script, just after the war plugin is applied. I can’t find the syntax that will work.

Can someone help?

It’s been a while, but I would guess you’d have to obtain the “War” task with “project.war”, inside a “project.afterEvaluate” block, and then modify the “archiveName” property of that task. You’d of course want to have a “project.plugins.apply(WarPlugin)” in the plugin’s “apply” method.

1 Like

Thanks, this is the answer.
I’d applied the plugin, but didn’t realize that doing so made the task available via “project.war”.