33require 'cocoapods-project-hmap/podfile_dsl'
44require 'cocoapods-project-hmap/pod_target'
55require 'cocoapods-project-hmap/post_install_hook_context'
6- require 'cocoapods-project-hmap/hmap_generator'
76
87module ProjectHeaderMap
98 Pod ::HooksManager . register ( 'cocoapods-project-hmap' , :post_install ) do |post_context |
@@ -18,14 +17,19 @@ module ProjectHeaderMap
1817 Pod ::UI . message "- hanlding headers of aggregate target :#{ one . name } " . green
1918 one . pod_targets . each do |target |
2019 Pod ::UI . message "- hanlding headers of target :#{ target . name } "
21- pods_hmap . add_hmap_with_header_mapping ( target . public_header_mappings_by_file_accessor , generate_type , target . name )
20+ # There is no need to add headers of dynamic framework to hmap.
21+ unless target . defines_module? && target . requires_frameworks?
22+ pods_hmap . add_hmap_with_header_mapping ( target . public_header_mappings_by_file_accessor , generate_type , target . name , target . product_module_name )
23+ else
24+ Pod ::UI . message "- skip dynamic framework: #{ target . name } "
25+ end
26+
2227 unless $hmap_black_pod_list. include? ( target . name ) || $prebuilt_hmap_for_pod_targets == false
2328 target_hmap = HmapGenerator . new
2429 # set project header for current target
25- target_hmap . add_hmap_with_header_mapping ( target . header_mappings_by_file_accessor , HmapGenerator ::BOTH , target . name )
26- target . dependent_targets . each do |depend_target |
27- # set public header for dependent target
28- target_hmap . add_hmap_with_header_mapping ( depend_target . public_header_mappings_by_file_accessor , generate_type , depend_target . name )
30+ target_hmap . add_hmap_with_header_mapping ( target . header_mappings_by_file_accessor , HmapGenerator ::BOTH , target . name , target . product_module_name )
31+ if target . respond_to? ( :recursively_add_dependent_headers_to_hmap )
32+ target . recursively_add_dependent_headers_to_hmap ( target_hmap , generate_type )
2933 end
3034
3135 target_hmap_name = "#{ target . name } .hmap"
0 commit comments