cocoapods-ppbuild 1.0.0 → 1.0.4
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 +4 -4
- data/lib/cocoapods-ppbuild/Integration.rb +10 -3
- data/lib/cocoapods-ppbuild/Main.rb +5 -4
- data/lib/cocoapods-ppbuild/Prebuild.rb +1 -0
- data/lib/cocoapods-ppbuild/gem_version.rb +1 -1
- data/lib/cocoapods-ppbuild/helper/passer.rb +4 -0
- data/lib/cocoapods-ppbuild/reference/reference_source_code.rb +51 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 177f5365623719afc81ba079dcdfee6b910d37c2ef6bec3cb9e3ed7ca06f5efa
|
4
|
+
data.tar.gz: 51832c007c5bcdd40fcb1243aae611c5fc36067793f3956f961be62c5fab7c40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 746936e683627c9a4518cb63ee101c049aea83364054d1e8df39b155e754fd42f0aa1831a10724e6c4f6ecdb15b35406b7dab66aa71efec7c6b5f3ab60be81b1
|
7
|
+
data.tar.gz: d343d195804b2c435e6b409d4df14e69ec581e05cff39c5046f0202abb9dc5defc32741c17b4e91d0825d211a516ba34de5e87d49c01fbbc82537595e1c314c8
|
@@ -51,7 +51,10 @@ module Pod
|
|
51
51
|
FileUtils.cp_r source, target, :remove_destination => true
|
52
52
|
else
|
53
53
|
FileUtils.cp source, target
|
54
|
-
end
|
54
|
+
end
|
55
|
+
if not target.exist?
|
56
|
+
raise "资源导入失败:#{target}"
|
57
|
+
end
|
55
58
|
end
|
56
59
|
end
|
57
60
|
|
@@ -74,8 +77,7 @@ module Pod
|
|
74
77
|
end
|
75
78
|
target_folder.rmtree if target_folder.exist?
|
76
79
|
target_folder.mkpath
|
77
|
-
|
78
|
-
|
80
|
+
|
79
81
|
walk(real_file_folder) do |child|
|
80
82
|
source = child
|
81
83
|
|
@@ -283,6 +285,11 @@ module Pod
|
|
283
285
|
spec.attributes_hash["resource_bundles"] = nil
|
284
286
|
spec.attributes_hash["resources"] ||= []
|
285
287
|
spec.attributes_hash["resources"] += bundle_names.map{|n| n+".bundle"}
|
288
|
+
elsif spec.attributes_hash['ios']["resource_bundles"]
|
289
|
+
bundle_names = spec.attributes_hash['ios']["resource_bundles"].keys
|
290
|
+
spec.attributes_hash['ios']["resource_bundles"] = nil
|
291
|
+
spec.attributes_hash['ios']["resources"] ||= []
|
292
|
+
spec.attributes_hash['ios']["resources"] += bundle_names.map{|n| n+".bundle"}
|
286
293
|
end
|
287
294
|
|
288
295
|
# to avoid the warning of missing license
|
@@ -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 !Pod.is_prebuild_stage && Pod::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
|
|
@@ -120,6 +120,7 @@ module Pod
|
|
120
120
|
end
|
121
121
|
|
122
122
|
output_path = sandbox.framework_folder_path_for_target_name(target.name)
|
123
|
+
output_path.rmtree if output_path.exist?
|
123
124
|
output_path.mkpath unless output_path.exist?
|
124
125
|
Pod::Prebuild.build(sandbox_path, target, output_path, bitcode_enabled, Podfile::DSL.custom_build_options, Podfile::DSL.custom_build_options_simulator)
|
125
126
|
|
@@ -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
|
@@ -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}", project, 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
|
+
|
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.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 彭懂
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -58,6 +58,7 @@ files:
|
|
58
58
|
- lib/cocoapods-ppbuild/helper/podfile_options.rb
|
59
59
|
- lib/cocoapods-ppbuild/helper/prebuild_sandbox.rb
|
60
60
|
- lib/cocoapods-ppbuild/helper/target_checker.rb
|
61
|
+
- lib/cocoapods-ppbuild/reference/reference_source_code.rb
|
61
62
|
- lib/cocoapods-ppbuild/rome/build_framework.rb
|
62
63
|
- lib/cocoapods-ppbuild/tool/tool.rb
|
63
64
|
- lib/cocoapods_plugin.rb
|