Class: Pod::PodTarget
- Inherits:
-
Object
- Object
- Pod::PodTarget
- Defined in:
- lib/cocoapods-project-hmap/pod_target.rb
Instance Method Summary collapse
- #generate_hmap(hmap, generate_type, only_public_headers = true, add_dependency = false) ⇒ Object
- #recursively_add_dependent_headers_to_hmap(hmap, generate_type) ⇒ Object
- #reset_header_search_with_relative_hmap_path(hmap_path) ⇒ Object
Instance Method Details
#generate_hmap(hmap, generate_type, only_public_headers = true, add_dependency = false) ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/cocoapods-project-hmap/pod_target.rb', line 67 def generate_hmap(hmap, generate_type, only_public_headers=true, add_dependency=false) # There is no need to add headers of target defines module to hmap. unless defines_module? unless $hmap_black_pod_list.include?(name) add_prebuilt_hmap_target(name) # Create hmap for current target if not in black list. hmap.add_hmap_with_header_mapping(only_public_headers ? public_header_mappings_by_file_accessor : header_mappings_by_file_accessor, generate_type, name, product_module_name) # Recursively add dependent targets if needed. recursively_add_dependent_headers_to_hmap(hmap, generate_type) if add_dependency else Pod::UI. "- skip target in black list :#{name}" end end end |
#recursively_add_dependent_headers_to_hmap(hmap, generate_type) ⇒ Object
59 60 61 62 63 64 65 |
# File 'lib/cocoapods-project-hmap/pod_target.rb', line 59 def recursively_add_dependent_headers_to_hmap(hmap, generate_type) dependent_targets.each do |depend_target| # set public header for dependent target depend_target.generate_hmap(hmap, generate_type, true, true) if depend_target.respond_to?(:generate_hmap) concat_prebuilt_hmap_targets(depend_target.prebuilt_hmap_target_names) if depend_target.prebuilt_hmap_target_names end end |
#reset_header_search_with_relative_hmap_path(hmap_path) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/cocoapods-project-hmap/pod_target.rb', line 36 def reset_header_search_with_relative_hmap_path(hmap_path) if build_settings.instance_of?(Hash) build_settings.each do |config_name, setting| config_file = setting.xcconfig config_file.reset_header_search_with_relative_hmap_path(hmap_path, @prebuilt_hmap_target_names.uniq) # https://github.com/CocoaPods/CocoaPods/issues/1216 # just turn off private xcconfig's USE_HEADERMAP flag config_file.set_use_hmap(false) config_path = xcconfig_path(config_name) config_file.save_as(config_path) end elsif build_settings.instance_of?(BuildSettings::PodTargetSettings) config_file = build_settings.xcconfig config_file.reset_header_search_with_relative_hmap_path(hmap_path, @prebuilt_hmap_target_names.uniq) # https://github.com/CocoaPods/CocoaPods/issues/1216 # just turn off private xcconfig's USE_HEADERMAP flag config_file.set_use_hmap(false) config_path = xcconfig_path config_file.save_as(config_path) else Pod::UI.notice 'Unknown build settings' end end |