I have a class with several custom tasks in it. There are about 30 of them. I was building these using the standard guidelines, which suggest that in my build where I want to use them I have to register them using the syntax
Can you elaborate a bit more what you mean?
A task is a class, so it is unclear to me what you mean when you say, that there are multiple tasks in one class.
Apologies, I misstated my requirement. I mean I have about 30 different custom tasks. So I would have 30 different classes. I don’t want to have to register each one individually. Is there some shortcut for doing that ? Or at least register them in one place and reuse it in every project ? Otherwise, I would be replicating these 30 lines of register steps in every build file for every project.
There is not really a shortcut, as you also have to specify the task name.
But for preventing the duplication, the idiomatic solution is to use convention plugins, for example implemented as precompiled script plugins.
Then you code it in one place and just apply that convention plugin to your projects.