code: public void buildFinishedClosure(BuildResult buildResult) {
          Throwable failure = buildResult.getFailure();
          Result result = failure == null ? Result.success() : Result.failure(failure);
          logger.info("Build finished with result " + result);
          MetricsDispatcher dispatcher = dispatcherSupplier.get();
          dispatcher.result(result);
  
          InfoBrokerPlugin infoBrokerPlugin = getNebulaInfoBrokerPlugin(buildResult.getGradle().getRootProject());
          if (infoBrokerPlugin != null) {
              Map<String, Object> reports = infoBrokerPlugin.buildReports();
              for (Map.Entry<String, Object> report : reports.entrySet()) {
                  dispatcher.report(report.getKey(), report.getValue());
              }
          }
  
          buildResultComplete.getAndSet(true);
          shutdownIfComplete();
      }
docs: /*
  I have separated buildFinished from GradleCollector's BuildAdapter because we need it to be called
  *after* all BuildListeners have completed their BuildFinished cycle. This is because InfoBrokerPlugin
  only allows access to its reports after the BuildFinish cycle has completed.