src/com/facebook/buck/features/apple/projectV2/ProjectGenerator.java
/** Adds the set of headers defined by headerVisibility to the merged header maps. */
Adds the set of headers defined by headerVisibility to the merged header maps.
Adds the set of headers defined by headerVisibility to the merged header maps .
private void addToMergedHeaderMap(
      TargetNode<? extends CommonArg> targetNode, HeaderMap.Builder headerMapBuilder) {
    CommonArg arg = targetNode.getConstructorArg();
    boolean shouldCreateHeadersSymlinks =
        arg.getXcodePublicHeadersSymlinks().orElse(cxxBuckConfig.getPublicHeadersSymlinksEnabled());
    Path headerSymlinkTreeRoot = getPathToHeaderSymlinkTree(targetNode, HeaderVisibility.PUBLIC);
    Path basePath;
    if (shouldCreateHeadersSymlinks) {
      basePath = getCellPathForTarget(targetNode.getBuildTarget()).resolve(headerSymlinkTreeRoot);
    } else {
      basePath = projectFilesystem.getRootPath();
    }
    ImmutableSortedMap<Path, SourcePath> publicCxxHeaders = getPublicCxxHeaders(targetNode);
    publicCxxHeaders.values().forEach(this::addRequiredBuildTargetFromSourcePath);
    for (Map.Entry<Path, SourcePath> entry : publicCxxHeaders.entrySet()) {
      Path path;
      if (shouldCreateHeadersSymlinks) {
        path = basePath.resolve(entry.getKey());
      } else {
        path = basePath.resolve(resolveSourcePath(entry.getValue()));
      }
      headerMapBuilder.add(entry.getKey().toString(), path);
    }
    ImmutableMap<Path, Path> swiftHeaderMapEntries =
        getSwiftPublicHeaderMapEntriesForTarget(targetNode);
    for (Map.Entry<Path, Path> entry : swiftHeaderMapEntries.entrySet()) {
      headerMapBuilder.add(entry.getKey().toString(), entry.getValue());
    }
  }
private void addToMergedHeaderMap ( TargetNode < ? extends CommonArg > targetNode , HeaderMap . Builder headerMapBuilder ) { CommonArg arg = targetNode . getConstructorArg ( ) ; boolean shouldCreateHeadersSymlinks = arg . getXcodePublicHeadersSymlinks ( ) . orElse ( cxxBuckConfig . getPublicHeadersSymlinksEnabled ( ) ) ; Path headerSymlinkTreeRoot = getPathToHeaderSymlinkTree ( targetNode , HeaderVisibility . PUBLIC ) ; Path basePath ; if ( shouldCreateHeadersSymlinks ) { basePath = getCellPathForTarget ( targetNode . getBuildTarget ( ) ) . resolve ( headerSymlinkTreeRoot ) ; } else { basePath = projectFilesystem . getRootPath ( ) ; } ImmutableSortedMap < Path , SourcePath > publicCxxHeaders = getPublicCxxHeaders ( targetNode ) ; publicCxxHeaders . values ( ) . forEach ( this :: addRequiredBuildTargetFromSourcePath ) ; for ( Map . Entry < Path , SourcePath > entry : publicCxxHeaders . entrySet ( ) ) { Path path ; if ( shouldCreateHeadersSymlinks ) { path = basePath . resolve ( entry . getKey ( ) ) ; } else { path = basePath . resolve ( resolveSourcePath ( entry . getValue ( ) ) ) ; } headerMapBuilder . add ( entry . getKey ( ) . toString ( ) , path ) ; } ImmutableMap < Path , Path > swiftHeaderMapEntries = getSwiftPublicHeaderMapEntriesForTarget ( targetNode ) ; for ( Map . Entry < Path , Path > entry : swiftHeaderMapEntries . entrySet ( ) ) { headerMapBuilder . add ( entry . getKey ( ) . toString ( ) , entry . getValue ( ) ) ; } }
Adds the set of headers defined by headerVisibility to the merged header maps.
Adds the set of headers defined by headerVisibility to the merged header maps .