Allow build operation listeners to log (#4693) This change moves build operation listening out of the standard listener infrastructure, to remove serialisation guarantees. As logging output now causes build operation notifications, whenever a build operation listener logged something it would fail due to the listener manager blocking overlapping signals.
By moving build operation listening out, overlapping and concurrent signals are now allowed. This places more responsibility on listener implementations (e.g. thread safety), but there are few and they are all internal.
Additionally, listeners will now never receive progress notifications before start notifications and after finish notifications for that operation.
Rationalise handling of “current” build operation and build operation ID For an upcoming change to emit console logging as build operation progress events, we need to associate all progress logging with the build operation. This pulled a thread on some long overdue cleanup.
The end result is:
1. Base build operation infrastructure is consolidated org.gradle.internal.operations. 2. Mechanism for passing thread global current build operation is more test friendly, and better named. 3. A consistent mechanism is used for binding the current operation to the thread, instead of two mechanisms. 4. Build operation IDs are typed to OperationIdentifier.