I have around 25 tasks for various devops things as part of my large multiproject build.
The structure of the project looks like this
RootProject
-buildSrc
-DirectoryA
-SubProjectA1
-SubProjectA2
-SubProjectA3
-DirectoryB
-SubProjectB1
-SubProjectB2
-DirectoryC
-SubProjectC1
-SubProjectC2
etc..
Directories are there just to conveniently separate projects. RootProject and all SubProject have build.gradle files.
In the RootProject build.gradle file there are around 25 tasks. These tasks are configured on both root project and subprojects.
They make build.gradle rather long and complicated. So I thought of moving them into separate Tasks.gradle file located under buildSrc directory. And then pulling them in with "apply from"
Is this a good practice or is there a better way?
If I pull them in, there is another issue. Some tasks are configured for SubProjects, and other are configured for RootProject. So I can't really just put them into single Tasks.gradle file.
Should I then put them into something like RootProjectTasks.gradle and SubProjectsTasks.gradle?
It all feels a little wrong...