Exemplo n.º 1
0
 /** Returns null if any build-info values are not ready. */
 @Nullable
 CachingAnalysisEnvironment createAnalysisEnvironment(
     ArtifactOwner owner,
     boolean isSystemEnv,
     EventHandler eventHandler,
     Environment env,
     BuildConfiguration config) {
   if (config != null && !getWorkspaceStatusValues(env, config)) {
     return null;
   }
   boolean extendedSanityChecks = config != null && config.extendedSanityChecks();
   boolean allowRegisteringActions = config == null || config.isActionsEnabled();
   return new CachingAnalysisEnvironment(
       artifactFactory,
       owner,
       isSystemEnv,
       extendedSanityChecks,
       eventHandler,
       env,
       allowRegisteringActions,
       binTools);
 }
Exemplo n.º 2
0
 public void assertConfigurationsHaveUniqueOutputDirectories(
     BuildConfigurationCollection configCollection) throws Exception {
   Collection<BuildConfiguration> allConfigs = configCollection.getAllConfigurations();
   Map<Root, BuildConfiguration> outputPaths = new HashMap<>();
   for (BuildConfiguration config : allConfigs) {
     if (config.isActionsEnabled()) {
       BuildConfiguration otherConfig = outputPaths.get(config.getOutputDirectory());
       if (otherConfig != null) {
         throw new IllegalStateException(
             "The output path '"
                 + config.getOutputDirectory()
                 + "' is the same for configurations '"
                 + config
                 + "' and '"
                 + otherConfig
                 + "'");
       } else {
         outputPaths.put(config.getOutputDirectory(), config);
       }
     }
   }
 }