File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -154,9 +154,11 @@ def remove_target_files_if_needed
154
154
prebuilt_specs . each do |spec |
155
155
# `spec` may be a subspec, so we use the root's name
156
156
root_name = spec . root . name
157
+
158
+ target = name_to_target_hash [ root_name ]
159
+ next if Prebuild ::Passer . target_names_to_skip_integration_framework . include? target . pod_name
157
160
158
161
# use the prebuilt framework
159
- target = name_to_target_hash [ root_name ]
160
162
original_vendored_frameworks = spec . attributes_hash [ "vendored_frameworks" ] || [ ]
161
163
if original_vendored_frameworks . kind_of? ( String )
162
164
original_vendored_frameworks = [ original_vendored_frameworks ]
Original file line number Diff line number Diff line change @@ -153,14 +153,25 @@ def prebuild_frameworks!
153
153
# copy vendored libraries and frameworks
154
154
targets . each do |target |
155
155
root_path = self . sandbox . pod_dir ( target . name )
156
+ target_folder = sandbox . framework_folder_path_for_pod_name ( target . name )
157
+
158
+ # If target shouldn't build, we copy all the original files
159
+ # This is for target with only .a and .h files
160
+ if not target . should_build?
161
+ Prebuild ::Passer . target_names_to_skip_integration_framework ||= [ ]
162
+ Prebuild ::Passer . target_names_to_skip_integration_framework << target . pod_name
163
+ FileUtils . cp_r ( root_path , target_folder , :remove_destination => true )
164
+ next
165
+ end
166
+
156
167
target . spec_consumers . each do |consumer |
157
168
file_accessor = Sandbox ::FileAccessor . new ( root_path , consumer )
158
169
lib_paths = file_accessor . vendored_frameworks || [ ]
159
170
lib_paths += file_accessor . vendored_libraries
160
171
# @TODO dSYM files
161
172
lib_paths . each do |lib_path |
162
173
relative = lib_path . relative_path_from ( root_path )
163
- destination = sandbox . framework_folder_path_for_pod_name ( target . name ) + relative
174
+ destination = target_folder + relative
164
175
destination . dirname . mkpath unless destination . dirname . exist?
165
176
FileUtils . cp_r ( lib_path , destination , :remove_destination => true )
166
177
end
Original file line number Diff line number Diff line change @@ -26,6 +26,14 @@ class ResourcePath
26
26
#
27
27
# @return [Hash<String, [Passer::ResourcePath]>]
28
28
class_attr_accessor :resources_to_copy_for_static_framework
29
+
30
+ # Some pod won't be build in prebuild stage even if it have `binary=>true`.
31
+ # The targets of this pods have `should_build? == true`.
32
+ # We should skip integration (patch spec) for this pods
33
+ #
34
+ # @return [Array<String>]
35
+ class_attr_accessor :target_names_to_skip_integration_framework
36
+
29
37
end
30
38
end
31
39
end
You can’t perform that action at this time.
0 commit comments