Dropped a public method from one of the internal interfaces as it was not needed.
I need more events to be handled by the ResolvedConfigurationBuilder so I've pushed that to a separate class. New event that we're handling in the builder is 'addChild'. Once we receive notifications on all events that happen during the dependency graph building, we can safely serialise them and play back to build the results.
Pushed some more old dependency graph events onto the builder. We will be serialising them.
Pushed creation of the resolved artifact to the builder, removed an event that we don't really need ('start').
Improved the error message and exception kind.
Put back the 'start' event that configures the root because we actually need it.
Removed unnecessary build event (addArtifact). We already receive this kind of event.
Put back the exception type that was used before to avoid a breaking change. This should not be a GradleException in the first place but for now let's leave it be.
Changed the artifact factory to only provide the lazy artifact file download ('artifactSource'). We need full control on creation of the artifact in the resolved configuration builder.