Exemplo n.º 1
0
 private ServiceRegistry createGlobalClientServices() {
   return ServiceRegistryBuilder.builder()
       .displayName("Daemon client global services")
       .parent(NativeServices.getInstance())
       .provider(new GlobalScopeServices(false))
       .provider(new DaemonClientGlobalServices())
       .build();
 }
Exemplo n.º 2
0
  private Runnable runBuildInProcess(
      StartParameter startParameter,
      DaemonParameters daemonParameters,
      ServiceRegistry loggingServices) {
    ServiceRegistry globalServices =
        ServiceRegistryBuilder.builder()
            .displayName("Global services")
            .parent(loggingServices)
            .parent(NativeServices.getInstance())
            .provider(new GlobalScopeServices(startParameter.isContinuous()))
            .build();

    BuildActionExecuter<BuildActionParameters> executer = globalServices.get(BuildExecuter.class);
    StyledTextOutputFactory textOutputFactory = globalServices.get(StyledTextOutputFactory.class);
    DocumentationRegistry documentationRegistry = globalServices.get(DocumentationRegistry.class);
    DaemonUsageSuggestingBuildActionExecuter daemonUsageSuggestingExecuter =
        new DaemonUsageSuggestingBuildActionExecuter(
            executer, textOutputFactory, documentationRegistry);

    return runBuild(
        startParameter, daemonParameters, daemonUsageSuggestingExecuter, globalServices);
  }