lib/cocoapods-jxedt/binary/Intergation.rb in cocoapods-jxedt-0.0.12 vs lib/cocoapods-jxedt/binary/Intergation.rb in cocoapods-jxedt-0.0.13

- old
+ new

@@ -136,33 +136,21 @@ check_sandbox = Jxedt::Sandbox.from_sandbox(self.sandbox) specs = self.analysis_result.specifications prebuilt_specs = (specs.select do |spec| # rmtree - target_prebuild_files = self.sandbox.root + spec.root.name + "_Prebuild" + target_prebuild_files = self.sandbox.pod_dir(spec.name) + "_Prebuild" target_prebuild_files.rmtree if target_prebuild_files.exist? self.prebuild_pod_names.include? spec.root.name end) checked_specs = {} prebuilt_specs.each do |spec| checked_specs[spec.root.name] = [] if checked_specs[spec.root.name].nil? checked_specs[spec.root.name] << spec - # Use the prebuild framworks as vendered frameworks - # get_corresponding_targets - targets = Pod.fast_get_targets_for_pod_name(spec.root.name, self.pod_targets, cache) - targets.each do |target| - # the framework_file_path rule is decided when `install_for_prebuild`, - # as to compitable with older version and be less wordy. - check_sandbox.prebuild_vendored_frameworks(spec.root.name).each do |frame_file_path| - framework_file_path = "_Prebuild/" + frame_file_path - framework_file_path = nil if checked_specs[spec.root.name].size > 1 # spec.root.name相同的只添加一次framework文件 - add_vendered_framework(spec, target.platform.name.to_s, framework_file_path) - end - end # Clean the source files # we just add the prebuilt framework to specific platform and set no source files # for all platform, so it doesn't support the sence that 'a pod perbuild for one # platform and not for another platform.' empty_source_files(spec) @@ -184,11 +172,28 @@ prebuild_bundles = check_sandbox.prebuild_bundles(spec.root.name).each.map { |bundle_path| "_Prebuild/" + bundle_path } prebuild_bundles = [] if checked_specs[spec.root.name].size > 1 # spec.root.name相同的只添加一次bundle文件 spec.attributes_hash["resources"] += prebuild_bundles end + # Use the prebuild framworks as vendered frameworks + # get_corresponding_targets + targets = Pod.fast_get_targets_for_pod_name(spec.root.name, self.pod_targets, cache) + targets.each do |target| + # the framework_file_path rule is decided when `install_for_prebuild`, + # as to compitable with older version and be less wordy. + check_sandbox.prebuild_vendored_frameworks(spec.root.name).each do |frame_file_path| + framework_file_path = "_Prebuild/" + frame_file_path + framework_file_path = nil if checked_specs[spec.root.name].size > 1 # spec.root.name相同的只添加一次framework文件 + add_vendered_framework(spec, target.platform.name.to_s, framework_file_path) + end + + # clear resource when target is a dynamic framework + spec.attributes_hash["resources"] = [] if target.build_as_dynamic_framework? + end + # to avoid the warning of missing license spec.attributes_hash["license"] = {} + # keep all file in pods spec.attributes_hash["preserve_paths"] = "**/*" end end