src/com/facebook/buck/features/apple/projectV2/ProjectGenerator.java
/** Generates the merged header maps and write it to the public header symlink tree location. */
Generates the merged header maps and write it to the public header symlink tree location.
Generates the merged header maps and write it to the public header symlink tree location .
private void createMergedHeaderMap() throws IOException {
    HeaderMap.Builder headerMapBuilder = new HeaderMap.Builder();
    Set<TargetNode<? extends CommonArg>> processedNodes = new HashSet<>();
    for (TargetNode<?> targetNode : targetGraph.getAll(targetsInRequiredProjects)) {
      getAppleNativeNode(targetGraph, targetNode)
          .ifPresent(
              argTargetNode ->
                  visitRecursiveHeaderSymlinkTrees(
                      argTargetNode,
                      (depNativeNode, headerVisibility) -> {
                        if (processedNodes.contains(depNativeNode)) {
                          return;
                        }
                        if (headerVisibility == HeaderVisibility.PUBLIC) {
                          addToMergedHeaderMap(depNativeNode, headerMapBuilder);
                          processedNodes.add(depNativeNode);
                        }
                      }));
    }
    Path mergedHeaderMapRoot = getPathToMergedHeaderMap();
    Path headerMapLocation = getHeaderMapLocationFromSymlinkTreeRoot(mergedHeaderMapRoot);
    Cell workspaceCell = projectCell.getCell(workspaceTarget.get());
    workspaceCell.getFilesystem().mkdirs(mergedHeaderMapRoot);
    workspaceCell
        .getFilesystem()
        .writeBytesToPath(headerMapBuilder.build().getBytes(), headerMapLocation);
  }
private void createMergedHeaderMap ( ) throws IOException { HeaderMap . Builder headerMapBuilder = new HeaderMap . Builder ( ) ; Set < TargetNode < ? extends CommonArg > > processedNodes = new HashSet < > ( ) ; for ( TargetNode < ? > targetNode : targetGraph . getAll ( targetsInRequiredProjects ) ) { getAppleNativeNode ( targetGraph , targetNode ) . ifPresent ( argTargetNode -> visitRecursiveHeaderSymlinkTrees ( argTargetNode , ( depNativeNode , headerVisibility ) -> { if ( processedNodes . contains ( depNativeNode ) ) { return ; } if ( headerVisibility == HeaderVisibility . PUBLIC ) { addToMergedHeaderMap ( depNativeNode , headerMapBuilder ) ; processedNodes . add ( depNativeNode ) ; } } ) ) ; } Path mergedHeaderMapRoot = getPathToMergedHeaderMap ( ) ; Path headerMapLocation = getHeaderMapLocationFromSymlinkTreeRoot ( mergedHeaderMapRoot ) ; Cell workspaceCell = projectCell . getCell ( workspaceTarget . get ( ) ) ; workspaceCell . getFilesystem ( ) . mkdirs ( mergedHeaderMapRoot ) ; workspaceCell . getFilesystem ( ) . writeBytesToPath ( headerMapBuilder . build ( ) . getBytes ( ) , headerMapLocation ) ; }
Generates the merged header maps and write it to the public header symlink tree location.
Generates the merged header maps and write it to the public header symlink tree location .
// Includes the public headers of the dependencies in the merged header map. // Writes the resulting header map.