cocoapods-xcframework 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5f82bd06f313889e45d18abb7d66ff2ee78516575754c09a41edc700d52aba1
4
- data.tar.gz: 8828713c3735d4af8ad194e96e80cab0e9705b527921cf542b536a1248cc9ba7
3
+ metadata.gz: 7be443184d16587d0967f9f2ea2854504e63f809cac1a3ecd42da7b7bfc093ee
4
+ data.tar.gz: f9c4ecc06ba587319ba049b413ac4a3176a09143ba9a29fc207bda7f44e297d6
5
5
  SHA512:
6
- metadata.gz: 94f8739a2e0ef78df20f5475e860b400909295dff8393ecbe12dfded326d9c38016dd50cb2c665c26afb0de8e297bbec7f9c3d74782409358d36d6c2fb8362bc
7
- data.tar.gz: 3324b859a452d8461f89666b9da4529e942cd30de79352fb09eb5b26de6335518236b4eadb7e8f072f079814b7b2eca0071e031df1dc1824b962a4333064e7fe
6
+ metadata.gz: 5298eca4684e586bcfd5670ac6f0831c6b8cc9a25fb209ae3b19a6ade8ac6f1faba0c20da54ab014495693183417e1d4257aec2fa0616daa76c6d6a591070889
7
+ data.tar.gz: 1e294d7ec2524dd4a0d1fd8b2e4adab72733c0953dc64ee74b4fde35cf06a257bbfa1ca86f618d14c3171a0b33387965c70adce01fdde301994b26c80819fff3
@@ -1,3 +1,3 @@
1
1
  module CocoapodsFramework
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -48,8 +48,10 @@ module Pod
48
48
 
49
49
  unless installer.nil?
50
50
  installer.pods_project.targets.each do |target|
51
- target.build_configurations.each do |configuration|
52
- configuration.build_settings['CLANG_MODULES_AUTOLINK'] = 'NO'
51
+ if target.name == spec.name
52
+ target.build_configurations.each do |configuration|
53
+ configuration.build_settings['CLANG_MODULES_AUTOLINK'] = 'NO'
54
+ end
53
55
  end
54
56
  end
55
57
  installer.pods_project.save
@@ -43,8 +43,11 @@ module Pod
43
43
 
44
44
  def collect_bundles
45
45
  ["iphoneos","macOS","appletvos","watchos"].each do |plat|
46
- export_dir = "#{@sandbox_root}/export/*-#{plat}/**/#{@spec.name}.bundle"
46
+ export_dir = "#{@sandbox_root}/export/*-#{plat}/**/#{@spec.name}.bundle/**"
47
47
  Pathname.glob(export_dir).each do |bundle|
48
+ if bundle.to_s.include? "#{@spec.name}.bundle/Info.plist"
49
+ return
50
+ end
48
51
  @outputs[:bundle] = "#{@sandbox_root}/bundle"
49
52
  native_platform = to_native_platform plat
50
53
  path = Pathname.new "#{@sandbox_root}/bundle/#{native_platform}"
@@ -103,7 +106,15 @@ module Pod
103
106
  outputs_bundle target_dir
104
107
  new_spec_hash = generic_new_podspec_hash @spec
105
108
  new_spec_hash[:vendored_frameworks] = "#{@spec.name}.xcframework"
106
- new_spec_hash[:resource_bundles] = find_bundles target_dir
109
+ find_bundles(target_dir).each do |plat, value|
110
+ if new_spec_hash[plat]
111
+ new_spec_hash[plat]["resource_bundles"] = value
112
+ else
113
+ new_spec_hash[plat] = {
114
+ "resource_bundles" => value
115
+ }
116
+ end
117
+ end
107
118
  require 'json'
108
119
  spec_json = JSON.pretty_generate(new_spec_hash) << "\n"
109
120
  File.open("#{target_dir}/#{@spec.name}.podspec.json",'wb+') do |f|
@@ -115,13 +126,14 @@ module Pod
115
126
 
116
127
  def find_bundles target_dir
117
128
  bundle_root = "#{target_dir}/bundle/"
118
- bundle_name = "/#{@spec.name}.bundle"
119
- pattern = "#{bundle_root}*#{bundle_name}"
129
+ pattern = "#{bundle_root}*"
120
130
  result = {}
121
131
  Pathname.glob(pattern).each do |bundle|
122
132
  bundle_relative_path = bundle.to_s.gsub(bundle_root, "")
123
- plat = bundle_relative_path.gsub(bundle_name,"")
124
- result[plat] = "bundle/" + bundle_relative_path
133
+ plat = bundle_relative_path
134
+ result[plat] = {
135
+ "NMCAlbumKit" => "bundle/" + bundle_relative_path + "/*"
136
+ }
125
137
  end
126
138
  result
127
139
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-xcframework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - 戴易超
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-14 00:00:00.000000000 Z
11
+ date: 2021-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods
@@ -90,6 +90,7 @@ files:
90
90
  - pkg/cocoapods-framework-0.0.3.gem
91
91
  - pkg/cocoapods-xcframework-0.0.4.gem
92
92
  - pkg/cocoapods-xcframework-0.0.6.gem
93
+ - pkg/cocoapods-xcframework-0.0.7.gem
93
94
  - spec/command/framework_spec.rb
94
95
  - spec/spec_helper.rb
95
96
  homepage: https://github.com/TyrantDante/cocoapods-framework