cocoapods-ppbuild 1.0.2 → 1.0.3

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: 5814aba56288624bef19f4bf6bbeb81ce9b588f649602c530d8de4f88ff4bdfa
4
- data.tar.gz: 56020bd0dde6cade57650ec2c892ea2221408ed5b6c7a49e2a71e81cd94addba
3
+ metadata.gz: 125cd2ab22ddea59ff739faefe3e6f37543f65cebf38ef89221daaa490074f71
4
+ data.tar.gz: e68fba8f04a65459c4d5a3d19b7b44f988b1d011327eb880eb06fe3c4dc4e4d3
5
5
  SHA512:
6
- metadata.gz: 860d510a8fb04429890d099d88fd953ff5d2c0b7b3c2991245bbe211da8efb4601a302c6174178d491d7fc60dc595139b6d5a198b1aab35e566e9aa4dad66294
7
- data.tar.gz: ae896e12c09e34ec9cded032c303c14c9b383b9401e0c293cae9f082fbbe3f04f5720b71f267b1d46950496d30922afe320a5e9af808f22ea8a010cdd0ef3df0
6
+ metadata.gz: 3626ecad3da53ef920bb01107be4f44d654c9ce88f349283e70a8f00aa46c834072851eb2f1248dd612bf37e548df10214b64f13c59b3eef6c7ed1a81a59e614
7
+ data.tar.gz: 1cf9a943172c70e97619a4861330a427c0c3e04a4ce95811699f90b17fc73293a2f8d5ae82b0a4f9f21e95d0f12867e7f64b7d51f18520e436756927145d41c6
@@ -86,9 +86,6 @@ module Pod
86
86
  class_attr_accessor :custom_build_options_simulator
87
87
  self.custom_build_options = []
88
88
  self.custom_build_options_simulator = []
89
-
90
- class_attr_accessor :static_build_pod_names
91
- self.static_build_pod_names = []
92
89
  end
93
90
  end
94
91
  end
@@ -179,6 +176,10 @@ Pod::HooksManager.register('cocoapods-ppbuild', :post_install) do |installer_con
179
176
  if Pod::Podfile::DSL.static_binary
180
177
  Pod::PrebuildSandbox.replace_tagert_copy_source_sh(installer_context)
181
178
  end
182
-
179
+
180
+ if Podfile::DSL.dont_remove_source_code
181
+ require_relative 'Reference/reference_source_code'
182
+ installer_context.refrence_source_code
183
+ end
183
184
  end
184
185
 
@@ -0,0 +1,51 @@
1
+
2
+ require 'xcodeproj'
3
+ require_relative '../helper/passer'
4
+ require_relative '../helper/prebuild_sandbox'
5
+
6
+ module Pod
7
+ class Installer
8
+ class PostInstallHooksContext
9
+ # 将源码引入主工程,方便源码调试
10
+ def refrence_source_code
11
+ sandbox_path = Pathname.new(sandbox.root)
12
+ pre_sandbox = Pod::PrebuildSandbox.from_standard_sandbox(sandbox)
13
+
14
+ exsited_framework_pod_names = pre_sandbox.exsited_framework_pod_names || []
15
+ proj_path = sandbox_path + get_project_name("Pods")
16
+ project = Xcodeproj::Project.open(proj_path)
17
+ exsited_framework_pod_names.each do |target_name|
18
+ real_reference("_Prebuild/#{target_name}", proj_path, target_name)
19
+ end
20
+ project.save;
21
+ end
22
+
23
+ private
24
+ def get_project_name(tageter_name)
25
+ return "#{tageter_name}.xcodeproj"
26
+ end
27
+
28
+ def real_reference(file_path, project, target_name)
29
+ group = project.main_group.find_subpath(File.join("SourceCode", target_name), true)
30
+ group.set_source_tree('SOURCE_ROOT')
31
+ group.set_path(file_path)
32
+ add_files_to_group(group)
33
+ end
34
+
35
+ #添加文件链接
36
+ 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)
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+
51
+
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPpbuild
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -36,6 +36,10 @@ module Pod
36
36
  class_attr_accessor :target_names_to_skip_integration_framework
37
37
  self.target_names_to_skip_integration_framework = []
38
38
 
39
+ # 编译过的framework pod 名称
40
+ class_attr_accessor :static_build_pod_names
41
+ self.static_build_pod_names = []
42
+
39
43
  end
40
44
  end
41
45
  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.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - 彭懂
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-12 00:00:00.000000000 Z
11
+ date: 2021-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -49,6 +49,7 @@ 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
52
53
  - lib/cocoapods-ppbuild/command.rb
53
54
  - lib/cocoapods-ppbuild/command/ppbuild.rb
54
55
  - lib/cocoapods-ppbuild/gem_version.rb