Writing custom gradle plugins for my company’s project builds I have come across the same issue several times now and never found an answer searching:
I have a plugin that adds stuff to the project: + an extension + an instance of a custom task
The custom task is defined in a dedicated class. It’s built to be reusable. For use in my plugin I want to set some of its properties based on how the extension is configured. Unfortunately the task initialization closure gets executed with applyPlugin(), which is before the extension could be configured by the user.
What is a good (concise, readable) way to parameterize the task with the extension’s properties?
Thanks in advance!