class HMap::Target::FrameworkEntry

Attributes

app_build_dir[R]
configuration[R]
headers_real_paths[RW]
modules_real_paths[RW]
platform[R]
project_temp_dir[R]

Public Class Methods

new(configuration, platform, app_build_dir, project_temp_dir) click to toggle source
# File lib/cocoapods-hmap/framework/framework_vfs.rb, line 7
def initialize(configuration, platform, app_build_dir, project_temp_dir)
  @configuration = configuration
  @platform = platform
  @app_build_dir = app_build_dir
  @project_temp_dir = project_temp_dir
  @headers_real_paths = []
  @modules_real_paths = []
end
new_entrys_from_configurations_platforms(configurations, platforms, name, framework_name, module_path, headers) click to toggle source
# File lib/cocoapods-hmap/framework/framework_vfs.rb, line 28
def self.new_entrys_from_configurations_platforms(configurations, platforms, name, framework_name, module_path, headers)
  effective_platforms = Utils.effective_platforms_names(platforms)
  configurations.flat_map do |configuration|
    effective_platforms.map do |platform|
      entry = new_from_configuration_platform(configuration, platform, name, framework_name)
      entry.add_headers_modules(module_path, framework_name, headers)
      entry
    end
  end
end
new_from_configuration_platform(configuration, platform, name, framework_name) click to toggle source
# File lib/cocoapods-hmap/framework/framework_vfs.rb, line 20
def self.new_from_configuration_platform(configuration, platform, name, framework_name)
  dir = "#{configuration}-#{platform}"
  app_build_dir = File.join(PodsSpecification.instance.app_build_dir, dir, name,
                            "#{framework_name}.framework")
  project_temp_dir = File.join(PodsSpecification.instance.project_temp_dir, dir, "#{name}.build")
  new(configuration, platform, app_build_dir, project_temp_dir)
end

Public Instance Methods

add_headers_modules(module_path, framework_name, headers) click to toggle source
# File lib/cocoapods-hmap/framework/framework_vfs.rb, line 39
def add_headers_modules(module_path, framework_name, headers)
  has_private_module = module_path.glob('module*.modulemap').length > 1
  e_headers = ->(path, *names) { names.inject(Pathname(path)) { |e, n| e.join(n) } }
  @headers_real_paths += headers
  @headers_real_paths << e_headers.call(app_build_dir, 'Headers',
                                             "#{framework_name}-Swift.h")
  @modules_real_paths << e_headers.call(project_temp_dir, 'module.modulemap')
  if has_private_module
    @modules_real_paths << e_headers.call(entry.project_temp_dir,
                                               'module.private.modulemap')
  end
end
framework_moduler_path() click to toggle source
# File lib/cocoapods-hmap/framework/framework_vfs.rb, line 16
def framework_moduler_path
  File.join(app_build_dir, 'Modules')
end