My plugins apply a variety of conventions to enable a standard, but configurable, way to build any given project. It does this at three points in time;
- when the plugin is applied 2. when ‘Gradle#projectsEvaluated’ is fired 3. when ‘TaskExecutionGraph#whenReady’ is fired
This works perfectly well but I have 2 main problems;
- it is not v easy to navigate, particularly for those new to this code 2. the order in which the callbacks fire appears to be undefined (in api terms) and callback registration order (in practice)
The former can be worked around.
The latter feels brittle when there are multiple “independent” plugins involved along with n subprojects, each of which are doing their own thing. It becomes v difficult to know what order things will happen in as you have to work through the order things are listed in the build script itself and then go through each project to see what each one does.
My Q is whether there are common strategies that people use to ameliorate this effect?
Alternatively are there any plans to extend this in gradle core? It feels like it would be nice to have a (simpler) task style dependency graph that fires on each callback rather than a bunch of callbacks that fire in insertion order (though I realise this may be overkill).