From 008b1967498ceab6d0bc756f1d18e8cc808c3b5a Mon Sep 17 00:00:00 2001 From: dirtmelon <0xffdirtmelon@gmail.com> Date: Sun, 16 May 2021 11:11:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=9F=E6=88=90=20podspec=20=E6=97=B6?= =?UTF-8?q?=E4=B8=8D=E5=88=A0=E9=99=A4=20subspecs=20=EF=BC=8C=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E5=85=B6=E4=BB=96=20pod=20=E5=BA=93=E6=9C=89=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=20subspec=20=E6=97=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../helpers/spec_source_creator.rb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/cocoapods-imy-bin/lib/cocoapods-imy-bin/helpers/spec_source_creator.rb b/cocoapods-imy-bin/lib/cocoapods-imy-bin/helpers/spec_source_creator.rb index 52a7ff9..1ffb27e 100755 --- a/cocoapods-imy-bin/lib/cocoapods-imy-bin/helpers/spec_source_creator.rb +++ b/cocoapods-imy-bin/lib/cocoapods-imy-bin/helpers/spec_source_creator.rb @@ -85,10 +85,6 @@ def create_from_code_spec spec_hash.delete('resource_bundles') spec_hash.delete('exclude_files') spec_hash.delete('preserve_paths') - - spec_hash.delete('subspecs') - spec_hash.delete('default_subspecs') - spec_hash.delete('default_subspec') spec_hash.delete('vendored_frameworks') spec_hash.delete('vendored_framework') @@ -124,6 +120,16 @@ def create_from_code_spec 「 converted automatically by plugin cocoapods-imy-bin @厦门美柚 - slj 」 #{@spec.description} EOF + + # 处理一下 subspecs ,使用相同的配置 + if @spec.subspecs + @spec.subspecs.each do |subspec| + subspec.source_files = binary_source_files + subspec.public_header_files = binary_public_header_files + subspec.vendored_libraries = binary_vendored_libraries + subspec.resources = binary_resources if @spec.attributes_hash.keys.include?("resources") + end + end @spec end