src/com/facebook/buck/features/apple/projectV2/ProjectGenerator.java
/** List of frameworks and libraries that goes into the "Link Binary With Libraries" phase. */
List of frameworks and libraries that goes into the "Link Binary With Libraries" phase.
List of frameworks and libraries that goes into the " Link Binary With Libraries " phase .
private Iterable<FrameworkPath> collectRecursiveFrameworkDependencies(TargetNode<?> targetNode) {
    return FluentIterable.from(
            AppleBuildRules.getRecursiveTargetNodeDependenciesOfTypes(
                xcodeDescriptions,
                targetGraph,
                Optional.of(dependenciesCache),
                RecursiveDependenciesMode.LINKING,
                targetNode,
                ImmutableSet.<Class<? extends BaseDescription<?>>>builder()
                    .addAll(xcodeDescriptions.getXCodeDescriptions())
                    .add(PrebuiltAppleFrameworkDescription.class)
                    .build()))
        .transformAndConcat(
            input -> {
              Optional<TargetNode<CommonArg>> library = getLibraryNode(targetGraph, input);
              if (library.isPresent()
                  && !AppleLibraryDescription.isNotStaticallyLinkedLibraryNode(library.get())) {
                return Iterables.concat(
                    library.get().getConstructorArg().getFrameworks(),
                    library.get().getConstructorArg().getLibraries());
              }
              Optional<TargetNode<PrebuiltAppleFrameworkDescriptionArg>> prebuilt =
                  TargetNodes.castArg(input, PrebuiltAppleFrameworkDescriptionArg.class);
              if (prebuilt.isPresent()) {
                return Iterables.concat(
                    prebuilt.get().getConstructorArg().getFrameworks(),
                    prebuilt.get().getConstructorArg().getLibraries(),
                    ImmutableList.of(
                        FrameworkPath.ofSourcePath(
                            prebuilt.get().getConstructorArg().getFramework())));
              }
              Optional<TargetNode<PrebuiltCxxLibraryDescriptionArg>> prebuiltCxxLib =
                  TargetNodes.castArg(input, PrebuiltCxxLibraryDescriptionArg.class);
              if (prebuiltCxxLib.isPresent()) {
                Iterable<FrameworkPath> deps =
                    Iterables.concat(
                        prebuiltCxxLib.get().getConstructorArg().getFrameworks(),
                        prebuiltCxxLib.get().getConstructorArg().getLibraries());
                if (prebuiltCxxLib.get().getConstructorArg().getSharedLib().isPresent()) {
                  return Iterables.concat(
                      deps,
                      ImmutableList.of(
                          FrameworkPath.ofSourcePath(
                              prebuiltCxxLib.get().getConstructorArg().getSharedLib().get())));
                } else if (prebuiltCxxLib.get().getConstructorArg().getStaticLib().isPresent()) {
                  return Iterables.concat(
                      deps,
                      ImmutableList.of(
                          FrameworkPath.ofSourcePath(
                              prebuiltCxxLib.get().getConstructorArg().getStaticLib().get())));
                } else if (prebuiltCxxLib.get().getConstructorArg().getStaticPicLib().isPresent()) {
                  return Iterables.concat(
                      deps,
                      ImmutableList.of(
                          FrameworkPath.ofSourcePath(
                              prebuiltCxxLib.get().getConstructorArg().getStaticPicLib().get())));
                }
              }
              return ImmutableList.of();
            });
  }
private Iterable < FrameworkPath > collectRecursiveFrameworkDependencies ( TargetNode < ? > targetNode ) { return FluentIterable . from ( AppleBuildRules . getRecursiveTargetNodeDependenciesOfTypes ( xcodeDescriptions , targetGraph , Optional . of ( dependenciesCache ) , RecursiveDependenciesMode . LINKING , targetNode , ImmutableSet . < Class < ? extends BaseDescription < ? > > > builder ( ) . addAll ( xcodeDescriptions . getXCodeDescriptions ( ) ) . add ( PrebuiltAppleFrameworkDescription . class ) . build ( ) ) ) . transformAndConcat ( input -> { Optional < TargetNode < CommonArg > > library = getLibraryNode ( targetGraph , input ) ; if ( library . isPresent ( ) && ! AppleLibraryDescription . isNotStaticallyLinkedLibraryNode ( library . get ( ) ) ) { return Iterables . concat ( library . get ( ) . getConstructorArg ( ) . getFrameworks ( ) , library . get ( ) . getConstructorArg ( ) . getLibraries ( ) ) ; } Optional < TargetNode < PrebuiltAppleFrameworkDescriptionArg > > prebuilt = TargetNodes . castArg ( input , PrebuiltAppleFrameworkDescriptionArg . class ) ; if ( prebuilt . isPresent ( ) ) { return Iterables . concat ( prebuilt . get ( ) . getConstructorArg ( ) . getFrameworks ( ) , prebuilt . get ( ) . getConstructorArg ( ) . getLibraries ( ) , ImmutableList . of ( FrameworkPath . ofSourcePath ( prebuilt . get ( ) . getConstructorArg ( ) . getFramework ( ) ) ) ) ; } Optional < TargetNode < PrebuiltCxxLibraryDescriptionArg > > prebuiltCxxLib = TargetNodes . castArg ( input , PrebuiltCxxLibraryDescriptionArg . class ) ; if ( prebuiltCxxLib . isPresent ( ) ) { Iterable < FrameworkPath > deps = Iterables . concat ( prebuiltCxxLib . get ( ) . getConstructorArg ( ) . getFrameworks ( ) , prebuiltCxxLib . get ( ) . getConstructorArg ( ) . getLibraries ( ) ) ; if ( prebuiltCxxLib . get ( ) . getConstructorArg ( ) . getSharedLib ( ) . isPresent ( ) ) { return Iterables . concat ( deps , ImmutableList . of ( FrameworkPath . ofSourcePath ( prebuiltCxxLib . get ( ) . getConstructorArg ( ) . getSharedLib ( ) . get ( ) ) ) ) ; } else if ( prebuiltCxxLib . get ( ) . getConstructorArg ( ) . getStaticLib ( ) . isPresent ( ) ) { return Iterables . concat ( deps , ImmutableList . of ( FrameworkPath . ofSourcePath ( prebuiltCxxLib . get ( ) . getConstructorArg ( ) . getStaticLib ( ) . get ( ) ) ) ) ; } else if ( prebuiltCxxLib . get ( ) . getConstructorArg ( ) . getStaticPicLib ( ) . isPresent ( ) ) { return Iterables . concat ( deps , ImmutableList . of ( FrameworkPath . ofSourcePath ( prebuiltCxxLib . get ( ) . getConstructorArg ( ) . getStaticPicLib ( ) . get ( ) ) ) ) ; } } return ImmutableList . of ( ) ; } ) ; }
List of frameworks and libraries that goes into the "Link Binary With Libraries" phase.
List of frameworks and libraries that goes into the " Link Binary With Libraries " phase .
// Libraries and bundles which has system frameworks and libraries.