Hi!
I need to modify an internal plugin/task to make it compatible with Configuration Cache. The plugin is applied to a multi-project build and creates a diagram of the project dependencies with some internal conventions.
Currently, I use project.allprojects inside a doLast block, plus access to some project-related information to annotate the final diagram. However, this is not allowed when enabling the Configuration Cache.
I see that I can inject ProjectLayout to get information specific to a single project. However, I could not figure out which service or property to access to get information about the entire build graph. I could recreate the information in the setup part of my task and access it in the doLast, but Gradle has to know about it when executing my task. I haven’t been able to access it yet. Do you have any suggestions or plugins that I can use for inspiration to understand how this should be implemented?
I found nothing useful here Services and Service Injection or here Configuration Cache
Thanks!