Sha256: 5166134b905f7e9276dc6b183faa020d19dbe6c6914326f16fd68ebeb019e36d

Contents?: true

Size: 978 Bytes

Versions: 5

Compression:

Stored size: 978 Bytes

Contents

module Pod
  class Installer
    # Returns the names of pod targets detected as prebuilt, including
    # those declared in Podfile and their dependencies
    def prebuilt_pod_names
      prebuilt_pod_targets.map(&:name)
    end

    # Returns the pod targets detected as prebuilt, including
    # those declared in Podfile and their dependencies
    def prebuilt_pod_targets
      @prebuilt_pod_targets ||= begin
        explicit_prebuilt_pod_names = aggregate_targets
          .flat_map { |target| target.target_definition.explicit_prebuilt_pod_names }
          .uniq

        targets = pod_targets.select { |target| explicit_prebuilt_pod_names.include?(target.pod_name) }
        dependencies = targets.flat_map(&:recursive_dependent_targets) # Treat dependencies as prebuilt pods
        all = (targets + dependencies).uniq
        all = all.reject { |target| sandbox.local?(target.pod_name) } unless Podfile::DSL.dev_pods_enabled?
        all
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cocoapods-binary-cache-0.1.6 lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/installer.rb
cocoapods-binary-cache-0.1.5 lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/installer.rb
cocoapods-binary-cache-0.1.3 lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/installer.rb
cocoapods-binary-cache-0.1.2 lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/installer.rb
cocoapods-binary-cache-0.1.1 lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/installer.rb