Sha256: 47e8250e61787aa2e1295d27fb241daa88f9707c5dae1b4674334789e8f4f76a

Contents?: true

Size: 1.6 KB

Versions: 6

Compression:

Stored size: 1.6 KB

Contents

module Pod
  class Frameworker
    include PodUtil
    include DirUtil
    include Config::Mixin
    def initialize(name, source, spec_sources, subspecs, configuration, force, use_modular_headers)
      @name = name
      @source = source
      @spec_sources = spec_sources
      @subspecs = subspecs
      @configuration = configuration
      @force = force
      @use_modular_headers = use_modular_headers
    end

    def run
      spec = spec_with_path @name
      @is_spec_from_path = true if spec
      spec ||= spec_with_name @name

      target_dir, work_dir = create_working_directory_by_spec spec, @force
      build_framework spec, work_dir, target_dir
    end

    def build_framework spec, work_dir, target_dir
      build_in_sandbox(work_dir, spec, target_dir)
    end

    def build_in_sandbox work_dir, spec, target_dir
      config.installation_root  = Pathname.new work_dir
      config.sandbox_root       = "#{work_dir}/Pods"
      sandbox = build_static_sandbox

      sandbox_installer = installation_root(
        sandbox,
        spec,
        @subspecs,
        @spec_sources,
        @use_modular_headers
      )

      perform_build(
        sandbox,
        sandbox_installer,
        spec,
        target_dir
      )
    end

    # def perform_build platform, sandbox, installer, spec
    def perform_build sandbox, installer, spec, target_dir
      sandbox_root = config.sandbox_root.to_s
      builder = Pod::XBuilder.new(
        installer,
        Dir.pwd,
        sandbox_root,
        spec,
        @configuration
      )
      builder.build
      builder.outputs target_dir
      target_dir
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cocoapods-xcframework-0.1.1 lib/cocoapods-framework/frameworker.rb
cocoapods-xcframework-0.1.0 lib/cocoapods-framework/frameworker.rb
cocoapods-xcframework-0.0.8 lib/cocoapods-framework/frameworker.rb
cocoapods-xcframework-0.0.7 lib/cocoapods-framework/frameworker.rb
cocoapods-xcframework-0.0.6 lib/cocoapods-framework/frameworker.rb
cocoapods-xcframework-0.0.5 lib/cocoapods-framework/frameworker.rb