cocoapods-ppbuild 1.0.3 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 125cd2ab22ddea59ff739faefe3e6f37543f65cebf38ef89221daaa490074f71
4
- data.tar.gz: e68fba8f04a65459c4d5a3d19b7b44f988b1d011327eb880eb06fe3c4dc4e4d3
3
+ metadata.gz: 5587e14083103040155f39c0f744e14723614d823b3b5d21cb8ca71f607854d2
4
+ data.tar.gz: fde98a6b36f0acab961236516f6fd23940ee34dd06b6d7cb38826f06cee626b3
5
5
  SHA512:
6
- metadata.gz: 3626ecad3da53ef920bb01107be4f44d654c9ce88f349283e70a8f00aa46c834072851eb2f1248dd612bf37e548df10214b64f13c59b3eef6c7ed1a81a59e614
7
- data.tar.gz: 1cf9a943172c70e97619a4861330a427c0c3e04a4ce95811699f90b17fc73293a2f8d5ae82b0a4f9f21e95d0f12867e7f64b7d51f18520e436756927145d41c6
6
+ metadata.gz: 6b59f4a0972f377c1e35652fe2d3467b90906a60b0cce66f32438b096971bedf6f593cf8bbf24c8aa26cc0730059a709b312715095379f8354b138df3191b2ca
7
+ data.tar.gz: 103dfcee88d2b1d811fce57f72e0fb77879fbee77895b2559b6744fecd849b7ce4189b9cba56cac5c6b7d4cbdfa1e8641d59e95a83304590318aa3bd030a951e
@@ -234,13 +234,20 @@ module Pod
234
234
  cache = []
235
235
 
236
236
  def add_vendered_framework(spec, platform, added_framework_file_path)
237
- if spec.attributes_hash[platform] == nil
238
- spec.attributes_hash[platform] = {}
237
+ platform_map = spec.attributes_hash[platform]
238
+ if platform_map == nil
239
+ platform_map = {}
239
240
  end
240
- vendored_frameworks = spec.attributes_hash[platform]["vendored_frameworks"] || []
241
+ vendored_frameworks = platform_map["vendored_frameworks"] || []
241
242
  vendored_frameworks = [vendored_frameworks] if vendored_frameworks.kind_of?(String)
243
+ vf = spec.attributes_hash["vendored_frameworks"] || []
244
+ vf = [vf] if vf.kind_of?(String)
245
+ vendored_frameworks += vf
242
246
  vendored_frameworks += [added_framework_file_path]
243
- spec.attributes_hash[platform]["vendored_frameworks"] = vendored_frameworks
247
+ spec.attributes_hash["vendored_frameworks"] = vendored_frameworks
248
+ if spec.attributes_hash[platform] != nil
249
+ spec.attributes_hash[platform].delete("vendored_frameworks")
250
+ end
244
251
  end
245
252
  def empty_source_files(spec)
246
253
  spec.attributes_hash["source_files"] = []
@@ -280,12 +287,13 @@ module Pod
280
287
  # target after pod install. But the bundle have already built when the prebuit
281
288
  # phase and saved in the framework folder. We will treat it as a normal resource
282
289
  # file.
290
+
283
291
  if spec.attributes_hash["resource_bundles"]
284
292
  bundle_names = spec.attributes_hash["resource_bundles"].keys
285
293
  spec.attributes_hash["resource_bundles"] = nil
286
294
  spec.attributes_hash["resources"] ||= []
287
295
  spec.attributes_hash["resources"] += bundle_names.map{|n| n+".bundle"}
288
- elsif spec.attributes_hash['ios']["resource_bundles"]
296
+ elsif spec.attributes_hash['ios'] && spec.attributes_hash['ios']["resource_bundles"]
289
297
  bundle_names = spec.attributes_hash['ios']["resource_bundles"].keys
290
298
  spec.attributes_hash['ios']["resource_bundles"] = nil
291
299
  spec.attributes_hash['ios']["resources"] ||= []
@@ -177,8 +177,8 @@ Pod::HooksManager.register('cocoapods-ppbuild', :post_install) do |installer_con
177
177
  Pod::PrebuildSandbox.replace_tagert_copy_source_sh(installer_context)
178
178
  end
179
179
 
180
- if Podfile::DSL.dont_remove_source_code
181
- require_relative 'Reference/reference_source_code'
180
+ if !Pod.is_prebuild_stage && Pod::Podfile::DSL.dont_remove_source_code
181
+ require_relative 'reference/reference_source_code'
182
182
  installer_context.refrence_source_code
183
183
  end
184
184
  end
@@ -114,13 +114,12 @@ module Pod
114
114
  Pod::UI.puts "Prebuild frameworks (total #{targets.count})"
115
115
  Pod::Prebuild.remove_build_dir(sandbox_path)
116
116
  targets.each do |target|
117
+ output_path = sandbox.framework_folder_path_for_target_name(target.name)
118
+ output_path.rmtree if output_path.exist?
117
119
  if !target.should_build?
118
120
  UI.puts "Prebuilding #{target.label}"
119
121
  next
120
122
  end
121
-
122
- output_path = sandbox.framework_folder_path_for_target_name(target.name)
123
- output_path.rmtree if output_path.exist?
124
123
  output_path.mkpath unless output_path.exist?
125
124
  Pod::Prebuild.build(sandbox_path, target, output_path, bitcode_enabled, Podfile::DSL.custom_build_options, Podfile::DSL.custom_build_options_simulator)
126
125
 
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPpbuild
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.6"
3
3
  end
@@ -15,8 +15,10 @@ module Pod
15
15
  proj_path = sandbox_path + get_project_name("Pods")
16
16
  project = Xcodeproj::Project.open(proj_path)
17
17
  exsited_framework_pod_names.each do |target_name|
18
- real_reference("_Prebuild/#{target_name}", proj_path, target_name)
18
+ real_reference("_Prebuild/#{target_name}", project, target_name)
19
19
  end
20
+ group = project.main_group.find_subpath(File.join("SourceCode"), true)
21
+ group.sort_by_type
20
22
  project.save;
21
23
  end
22
24
 
@@ -34,14 +36,14 @@ module Pod
34
36
 
35
37
  #添加文件链接
36
38
  def add_files_to_group(group)
37
- Dir.foreach(group.real_path) do |entry|
38
- filePath = File.join(group.real_path, entry)
39
- # 过滤目录和.DS_Store文件
40
- if entry != ".DS_Store" && !filePath.to_s.end_with?(".meta") &&entry != "." &&entry != ".." then
41
- # 向group中增加文件引用
42
- group.new_reference(filePath)
39
+ Dir.foreach(group.real_path) do |entry|
40
+ filePath = File.join(group.real_path, entry)
41
+ # 过滤目录和.DS_Store文件
42
+ if entry != ".DS_Store" && !filePath.to_s.end_with?(".meta") &&entry != "." &&entry != ".." then
43
+ # 向group中增加文件引用
44
+ group.new_reference(filePath)
45
+ end
43
46
  end
44
- end
45
47
  end
46
48
  end
47
49
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-ppbuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - 彭懂
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-21 00:00:00.000000000 Z
11
+ date: 2022-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -49,7 +49,6 @@ files:
49
49
  - lib/cocoapods-ppbuild/Integration.rb
50
50
  - lib/cocoapods-ppbuild/Main.rb
51
51
  - lib/cocoapods-ppbuild/Prebuild.rb
52
- - lib/cocoapods-ppbuild/Reference/reference_source_code.rb
53
52
  - lib/cocoapods-ppbuild/command.rb
54
53
  - lib/cocoapods-ppbuild/command/ppbuild.rb
55
54
  - lib/cocoapods-ppbuild/gem_version.rb
@@ -59,6 +58,7 @@ files:
59
58
  - lib/cocoapods-ppbuild/helper/podfile_options.rb
60
59
  - lib/cocoapods-ppbuild/helper/prebuild_sandbox.rb
61
60
  - lib/cocoapods-ppbuild/helper/target_checker.rb
61
+ - lib/cocoapods-ppbuild/reference/reference_source_code.rb
62
62
  - lib/cocoapods-ppbuild/rome/build_framework.rb
63
63
  - lib/cocoapods-ppbuild/tool/tool.rb
64
64
  - lib/cocoapods_plugin.rb