pod-builder 2.0.0.beta.35 → 2.0.0
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/README.md +1 -1
- data/lib/pod_builder/command/build.rb +8 -4
- data/lib/pod_builder/command/init.rb +27 -0
- data/lib/pod_builder/configuration.rb +2 -1
- data/lib/pod_builder/install.rb +4 -6
- data/lib/pod_builder/podfile.rb +0 -3
- data/lib/pod_builder/podfile_item.rb +7 -1
- data/lib/pod_builder/podspec.rb +1 -0
- data/lib/pod_builder/rome/post_install.rb +92 -100
- data/lib/pod_builder/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75ae604ccd8e9725dda21d10a5ef0c590ae862e4a099474dfe4c799c92ccba47
|
4
|
+
data.tar.gz: a040c4aca25a30495d6f20f35c2de28c7d95cde27c85403f9ab64bab6e30419b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45207cae794c65336e5c67654b5a1fcc787b9a2c6cb861e67d5645f00769c53bc2d0d8e7ae930e53ae00e0fa3558dc95969e080a61341a5101d737dc93749ba3
|
7
|
+
data.tar.gz: 3ea8460b857509577001fb25bf1e8721f28de773988c8dbbbd445e72c9006c430e20f4476fc25e6a1a712f27eaf16b4d5625c9271530684a96678b122ef8a554
|
data/README.md
CHANGED
@@ -130,7 +130,7 @@ This command will generate a custom lldinit file which will be stored in the _Po
|
|
130
130
|
|
131
131
|
The most convenient place to update the lldbinit file is in your Podfile pre_install or post_install actions. It is suggested to add the following lines
|
132
132
|
|
133
|
-
|
133
|
+
```
|
134
134
|
pid = spawn("pod_builder generate_lldbinit")
|
135
135
|
Process.detach(pid)
|
136
136
|
```
|
@@ -72,11 +72,15 @@ module PodBuilder
|
|
72
72
|
podfiles_items = [pods_to_build_debug] + [pods_to_build_release]
|
73
73
|
|
74
74
|
install_using_frameworks = Podfile::install_using_frameworks(analyzer)
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
75
|
+
if Configuration.react_native_project
|
76
|
+
if install_using_frameworks
|
77
|
+
raise "\n\nOnly static library packaging currently supported for react native projects. Please remove 'use_frameworks!' in #{PodBuilder::basepath("Podfile")}".red
|
78
|
+
end
|
79
79
|
prepare_defines_modules_override(all_buildable_items)
|
80
|
+
else
|
81
|
+
unless install_using_frameworks
|
82
|
+
raise "\n\nOnly framework packaging currently supported. Please add 'use_frameworks!' at root level (not nested in targets) in #{PodBuilder::basepath("Podfile")}".red
|
83
|
+
end
|
80
84
|
end
|
81
85
|
|
82
86
|
install_result = InstallResult.new
|
@@ -38,6 +38,7 @@ module PodBuilder
|
|
38
38
|
|
39
39
|
if podfile_content.include?("/node_modules/react-native/")
|
40
40
|
podfile_content = Podfile.prepare_for_react_native(podfile_content)
|
41
|
+
update_react_native_podspecs()
|
41
42
|
end
|
42
43
|
|
43
44
|
File.write(prebuilt_podfile_path, podfile_content)
|
@@ -116,6 +117,32 @@ module PodBuilder
|
|
116
117
|
def self.trim_gemfile_line(line)
|
117
118
|
return line.gsub("\"", "'").gsub(" ", "")
|
118
119
|
end
|
120
|
+
|
121
|
+
def self.update_react_native_podspecs
|
122
|
+
# React-Core.podspec
|
123
|
+
file = "React-Core.podspec"
|
124
|
+
paths = Dir.glob("#{PodBuilder::git_rootpath}/node_modules/**/#{file}")
|
125
|
+
raise "Unexpected number of #{file} found" if paths.count != 1
|
126
|
+
|
127
|
+
content = File.read(paths[0])
|
128
|
+
expected_header_search_path_prefix = "s.pod_target_xcconfig = { \"HEADER_SEARCH_PATHS\" => \""
|
129
|
+
raise "Expected header search path entry not found" unless content.include?(expected_header_search_path_prefix)
|
130
|
+
|
131
|
+
content.sub!(expected_header_search_path_prefix, "#{expected_header_search_path_prefix}\\\"$(PODS_ROOT)/Headers/Public/Flipper-Folly\\\" ")
|
132
|
+
File.write(paths[0], content)
|
133
|
+
|
134
|
+
# React-CoreModules.podspec
|
135
|
+
file = "React-CoreModules.podspec"
|
136
|
+
paths = Dir.glob("#{PodBuilder::git_rootpath}/node_modules/**/#{file}")
|
137
|
+
raise "Unexpected number of #{file} found" if paths.count != 1
|
138
|
+
|
139
|
+
content = File.read(paths[0])
|
140
|
+
expected_header_search_path_prefix = "\"HEADER_SEARCH_PATHS\" => \""
|
141
|
+
raise "Expected header search path entry not found" unless content.include?(expected_header_search_path_prefix)
|
142
|
+
|
143
|
+
content.sub!(expected_header_search_path_prefix, "#{expected_header_search_path_prefix}\\\"$(PODS_ROOT)/Headers/Public/Flipper-Folly\\\" ")
|
144
|
+
File.write(paths[0], content)
|
145
|
+
end
|
119
146
|
end
|
120
147
|
end
|
121
148
|
end
|
@@ -39,7 +39,8 @@ module PodBuilder
|
|
39
39
|
"ENABLE_BITCODE": "NO"
|
40
40
|
}
|
41
41
|
}.freeze
|
42
|
-
DEFAULT_SKIP_PODS = ["GoogleMaps"]
|
42
|
+
DEFAULT_SKIP_PODS = ["GoogleMaps", "React-RCTFabric", "React-Core", "React-CoreModules"] # Not including React-RCTNetwork might loose some debug warnings
|
43
|
+
|
43
44
|
DEFAULT_FORCE_PREBUILD_PODS = []
|
44
45
|
DEFAULT_BUILD_SYSTEM = "Latest".freeze # either Latest (New build system) or Legacy (Standard build system)
|
45
46
|
DEFAULT_LIBRARY_EVOLUTION_SUPPORT = false
|
data/lib/pod_builder/install.rb
CHANGED
@@ -256,11 +256,7 @@ module PodBuilder
|
|
256
256
|
return data["PreferenceSpecifiers"] || []
|
257
257
|
end
|
258
258
|
|
259
|
-
def self.copy_development_pods_source_code(podfile_content, podfile_items)
|
260
|
-
if Configuration.build_using_repo_paths
|
261
|
-
return podfile_content
|
262
|
-
end
|
263
|
-
|
259
|
+
def self.copy_development_pods_source_code(podfile_content, podfile_items)
|
264
260
|
# Development pods are normally built/integrated without moving files from their original paths.
|
265
261
|
# It is important that CocoaPods compiles the files under Configuration.build_path in order that
|
266
262
|
# DWARF debug info reference to this constant path. Doing otherwise breaks the assumptions that
|
@@ -276,7 +272,9 @@ module PodBuilder
|
|
276
272
|
FileUtils.cp_r("#{PodBuilder::basepath(podfile_item.path)}/.", destination_path)
|
277
273
|
end
|
278
274
|
|
279
|
-
|
275
|
+
unless Configuration.build_using_repo_paths
|
276
|
+
podfile_content.gsub!("'#{podfile_item.path}'", "'#{destination_path}'")
|
277
|
+
end
|
280
278
|
end
|
281
279
|
|
282
280
|
return podfile_content
|
data/lib/pod_builder/podfile.rb
CHANGED
@@ -394,9 +394,6 @@ module PodBuilder
|
|
394
394
|
def self.install_using_frameworks(analyzer)
|
395
395
|
target_settings = analyzer.podfile.target_definition_list.map(&:uses_frameworks?).uniq
|
396
396
|
if target_settings.count == 1
|
397
|
-
if target_settings.first == false && ENV["DEBUGGING"].nil?
|
398
|
-
raise "\n\nOnly framework packaging currently supported. Please add 'use_frameworks!' at root level (not nested in targets) in #{PodBuilder::basepath("Podfile")}".red
|
399
|
-
end
|
400
397
|
return target_settings.first
|
401
398
|
elsif target_settings.count > 1
|
402
399
|
raise "\n\n'use_frameworks!' should be declared only once at Podfile root level (not nested in targets)".red
|
@@ -154,7 +154,7 @@ module PodBuilder
|
|
154
154
|
@tag = checkout_options[opts_key][:tag]
|
155
155
|
@commit = checkout_options[opts_key][:commit]
|
156
156
|
@path = checkout_options[opts_key][:path]
|
157
|
-
@podspec_path = checkout_options[opts_key][:podspec]
|
157
|
+
@podspec_path = checkout_options[opts_key][:podspec]
|
158
158
|
@branch = checkout_options[opts_key][:branch]
|
159
159
|
@is_external = true
|
160
160
|
else
|
@@ -213,6 +213,12 @@ module PodBuilder
|
|
213
213
|
@is_static = spec.root.attributes_hash["static_framework"] || false
|
214
214
|
@xcconfig = spec.root.attributes_hash["xcconfig"] || {}
|
215
215
|
|
216
|
+
if spec.attributes_hash.has_key?("script_phases")
|
217
|
+
Configuration.skip_pods += [name, root_name]
|
218
|
+
Configuration.skip_pods.uniq!
|
219
|
+
puts "Will skip '#{root_name}' which defines script_phase in podspec".blue
|
220
|
+
end
|
221
|
+
|
216
222
|
default_subspecs_specs ||= begin
|
217
223
|
subspecs = all_specs.select { |t| t.name.split("/").first == @root_name }
|
218
224
|
subspecs.select { |t| @default_subspecs.include?(t.name.split("/").last) }
|
data/lib/pod_builder/podspec.rb
CHANGED
@@ -99,6 +99,7 @@ module PodBuilder
|
|
99
99
|
end
|
100
100
|
if !item.header_dir.nil? && !install_using_frameworks
|
101
101
|
podspec += "#{indentation}#{spec_var}.header_dir = '#{item.header_dir}'\n"
|
102
|
+
podspec += "#{indentation}#{spec_var}.header_mappings_dir = '#{item.root_name}/Headers/#{item.header_dir}'\n"
|
102
103
|
end
|
103
104
|
|
104
105
|
if item.xcconfig.keys.count > 0
|
@@ -1,5 +1,3 @@
|
|
1
|
-
# TODO: Add support when building without use_frameworks!
|
2
|
-
|
3
1
|
require 'fourflusher'
|
4
2
|
require 'colored'
|
5
3
|
require 'pathname'
|
@@ -20,7 +18,7 @@ module PodBuilder
|
|
20
18
|
excluded_archs = ["i386"] # Fixes https://github.com/Subito-it/PodBuilder/issues/17
|
21
19
|
excluded_archs += build_for_apple_silicon ? [] : ["arm64"]
|
22
20
|
xcodebuild(sandbox, target_label, simulator, deployment_target, configuration, deterministic_build, excluded_archs, {})
|
23
|
-
|
21
|
+
|
24
22
|
spec_names = target.specs.map { |spec| [spec.root.name, spec.root.module_name] }.uniq
|
25
23
|
spec_names.each do |root_name, module_name|
|
26
24
|
device_base = "#{build_dir}/#{configuration}-#{device}/#{root_name}"
|
@@ -66,30 +64,30 @@ module PodBuilder
|
|
66
64
|
FileUtils.rm_rf(simulator_framework_lib)
|
67
65
|
end
|
68
66
|
end
|
69
|
-
|
67
|
+
|
70
68
|
def self.build_for_iosish_platform_lib(sandbox, build_dir, target, device, simulator, configuration, deterministic_build, build_for_apple_silicon, prebuilt_root_paths)
|
71
69
|
raise "\n\nApple silicon hardware still unsupported since it requires to migrate to xcframeworks".red if build_for_apple_silicon
|
72
|
-
|
70
|
+
|
73
71
|
deployment_target = target.platform_deployment_target
|
74
72
|
target_label = target.cocoapods_target_label
|
75
|
-
|
73
|
+
|
76
74
|
spec_names = target.specs.map { |spec| [spec.root.name, spec.root.module_name] }.uniq
|
77
|
-
|
75
|
+
|
78
76
|
xcodebuild(sandbox, target_label, device, deployment_target, configuration, deterministic_build, [], prebuilt_root_paths)
|
79
77
|
excluded_archs = build_for_apple_silicon ? [] : ["arm64"]
|
80
78
|
xcodebuild(sandbox, target_label, simulator, deployment_target, configuration, deterministic_build, excluded_archs, prebuilt_root_paths)
|
81
|
-
|
79
|
+
|
82
80
|
spec_names.each do |root_name, module_name|
|
83
81
|
simulator_base = "#{build_dir}/#{configuration}-#{simulator}/#{root_name}"
|
84
82
|
simulator_lib = "#{simulator_base}/lib#{root_name}.a"
|
85
|
-
|
83
|
+
|
86
84
|
device_base = "#{build_dir}/#{configuration}-#{device}/#{root_name}"
|
87
85
|
device_lib = "#{device_base}/lib#{root_name}.a"
|
88
|
-
|
86
|
+
|
89
87
|
unless File.file?(device_lib) && File.file?(simulator_lib)
|
90
88
|
next
|
91
89
|
end
|
92
|
-
|
90
|
+
|
93
91
|
# Starting with Xcode 12b3 the simulator binary contains an arm64 slice as well which conflict with the one in the device_lib
|
94
92
|
# when creating the fat library. A naive workaround is to remove the arm64 from the simulator_lib however this is wrong because
|
95
93
|
# we might actually need to have 2 separated arm64 slices, one for simulator and one for device each built with different
|
@@ -101,12 +99,12 @@ module PodBuilder
|
|
101
99
|
end
|
102
100
|
|
103
101
|
raise "Lipo failed on #{device_lib}" unless system("xcrun lipo -create -output #{device_lib} #{device_lib} #{simulator_lib}")
|
104
|
-
|
102
|
+
|
105
103
|
device_headers = Dir.glob("#{device_base}/**/*.h")
|
106
104
|
simulator_headers = Dir.glob("#{simulator_base}/**/*.h")
|
107
105
|
device_headers.each do |device_path|
|
108
106
|
simulator_path = device_path.gsub(device_base, simulator_base)
|
109
|
-
|
107
|
+
|
110
108
|
merge_header_into(device_path, simulator_path)
|
111
109
|
end
|
112
110
|
simulator_only_headers = simulator_headers - device_headers.map { |t| t.gsub(device_base, simulator_base) }
|
@@ -117,12 +115,12 @@ module PodBuilder
|
|
117
115
|
FileUtils.mkdir_p(destination_folder)
|
118
116
|
FileUtils.cp(path, destination_folder)
|
119
117
|
end
|
120
|
-
|
118
|
+
|
121
119
|
swiftmodule_path = "#{simulator_base}/#{root_name}.swiftmodule"
|
122
120
|
if File.directory?(swiftmodule_path)
|
123
121
|
FileUtils.cp_r("#{swiftmodule_path}/.", "#{device_base}/#{root_name}.swiftmodule")
|
124
122
|
end
|
125
|
-
|
123
|
+
|
126
124
|
if File.exist?("#{device_base}/#{root_name}.swiftmodule")
|
127
125
|
# This is a swift pod with a swiftmodule in the root of the prebuilt folder
|
128
126
|
else
|
@@ -141,11 +139,11 @@ module PodBuilder
|
|
141
139
|
FileUtils.cp(path, destination_folder)
|
142
140
|
end
|
143
141
|
end
|
144
|
-
|
142
|
+
|
145
143
|
destination_path = "#{build_dir}/#{root_name}"
|
146
144
|
if Dir.glob("#{device_base}/**/*.{a,framework,h}").count > 0
|
147
145
|
FileUtils.mv(device_base, destination_path)
|
148
|
-
|
146
|
+
|
149
147
|
module_maps = Dir.glob("#{destination_path}/**/*.modulemap")
|
150
148
|
module_map_device_base = device_base.gsub(/^\/private/, "") + "/"
|
151
149
|
module_maps.each do |module_map|
|
@@ -156,7 +154,7 @@ module PodBuilder
|
|
156
154
|
end
|
157
155
|
end
|
158
156
|
end
|
159
|
-
|
157
|
+
|
160
158
|
def self.merge_header_into(device_file, simulator_file)
|
161
159
|
unless File.exist?(device_file) || File.exist?(simulator_file)
|
162
160
|
return
|
@@ -165,33 +163,33 @@ module PodBuilder
|
|
165
163
|
device_content = File.file?(device_file) ? File.read(device_file) : ""
|
166
164
|
simulator_content = File.file?(simulator_file) ? File.read(simulator_file) : ""
|
167
165
|
merged_content = %{
|
168
|
-
#if TARGET_OS_SIMULATOR
|
169
|
-
// ->
|
170
|
-
|
171
|
-
#{simulator_content}
|
172
|
-
|
173
|
-
// ->
|
174
|
-
#else
|
175
|
-
// ->
|
176
|
-
|
177
|
-
#{device_content}
|
178
|
-
|
179
|
-
// ->
|
180
|
-
#endif
|
166
|
+
#if TARGET_OS_SIMULATOR
|
167
|
+
// ->
|
168
|
+
|
169
|
+
#{simulator_content}
|
170
|
+
|
171
|
+
// ->
|
172
|
+
#else
|
173
|
+
// ->
|
174
|
+
|
175
|
+
#{device_content}
|
176
|
+
|
177
|
+
// ->
|
178
|
+
#endif
|
181
179
|
}
|
182
180
|
File.write(device_file, merged_content)
|
183
181
|
end
|
184
|
-
|
182
|
+
|
185
183
|
def self.add_simulator_conditional(path)
|
186
184
|
file_content = File.read(path)
|
187
185
|
content = %{
|
188
|
-
#if TARGET_OS_SIMULATOR
|
189
|
-
#{file_content}
|
190
|
-
#endif
|
186
|
+
#if TARGET_OS_SIMULATOR
|
187
|
+
#{file_content}
|
188
|
+
#endif
|
191
189
|
}
|
192
190
|
File.write(path, content)
|
193
191
|
end
|
194
|
-
|
192
|
+
|
195
193
|
def self.xcodebuild(sandbox, target, sdk='macosx', deployment_target=nil, configuration, deterministic_build, exclude_archs, prebuilt_root_paths)
|
196
194
|
args = %W(-project #{sandbox.project_path.realdirpath} -scheme #{target} -configuration #{configuration} -sdk #{sdk})
|
197
195
|
supported_platforms = { 'iphonesimulator' => 'iOS', 'appletvsimulator' => 'tvOS', 'watchsimulator' => 'watchOS' }
|
@@ -268,16 +266,14 @@ module PodBuilder
|
|
268
266
|
end
|
269
267
|
end
|
270
268
|
|
271
|
-
Pod::HooksManager.register('podbuilder-rome', :post_install) do |installer_context, user_options|
|
272
|
-
puts "Building".yellow
|
273
|
-
|
269
|
+
Pod::HooksManager.register('podbuilder-rome', :post_install) do |installer_context, user_options|
|
274
270
|
enable_dsym = user_options.fetch('dsym', true)
|
275
271
|
configuration = user_options.fetch('configuration', 'Debug')
|
276
272
|
uses_frameworks = user_options.fetch('uses_frameworks', true)
|
277
273
|
if user_options["pre_compile"]
|
278
274
|
user_options["pre_compile"].call(installer_context)
|
279
275
|
end
|
280
|
-
|
276
|
+
|
281
277
|
prebuilt_root_paths = JSON.parse(user_options["prebuilt_root_paths"].gsub('=>', ':'))
|
282
278
|
|
283
279
|
sandbox_root = Pathname(installer_context.sandbox_root)
|
@@ -301,75 +297,71 @@ Pod::HooksManager.register('podbuilder-rome', :post_install) do |installer_conte
|
|
301
297
|
when [:tvos, false] then PodBuilder::build_for_iosish_platform_lib(sandbox, build_dir, target, 'appletvos', 'appletvsimulator', configuration, PodBuilder::Configuration.deterministic_build, PodBuilder::Configuration.build_for_apple_silicon, prebuilt_root_paths)
|
302
298
|
when [:watchos, false] then PodBuilder::build_for_iosish_platform_lib(sandbox, build_dir, target, 'watchos', 'watchsimulator', configuration, PodBuilder::Configuration.deterministic_build, PodBuilder::Configuration.build_for_apple_silicon, prebuilt_root_paths)
|
303
299
|
else raise "\n\nUnknown platform '#{target.platform_name}'".red end
|
304
|
-
|
305
|
-
|
306
|
-
raise Pod::Informative, 'The build directory was not found in the expected location.' unless build_dir.directory?
|
300
|
+
end
|
307
301
|
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
umbrella.specs.each do |spec|
|
316
|
-
root_name = spec.name.split("/").first
|
317
|
-
|
318
|
-
if uses_frameworks
|
319
|
-
destination = File.join(base_destination, root_name)
|
320
|
-
else
|
321
|
-
destination = File.join(base_destination, root_name, root_name)
|
322
|
-
end
|
323
|
-
# Make sure the device target overwrites anything in the simulator build, otherwise iTunesConnect
|
324
|
-
# can get upset about Info.plist containing references to the simulator SDK
|
325
|
-
files = Pathname.glob("build/#{root_name}/*").reject { |f| f.to_s =~ /Pods[^.]+\.framework/ }
|
326
|
-
|
327
|
-
consumer = spec.consumer(umbrella.platform_name)
|
328
|
-
file_accessor = Pod::Sandbox::FileAccessor.new(sandbox.pod_dir(spec.root.name), consumer)
|
329
|
-
files += file_accessor.vendored_libraries
|
330
|
-
files += file_accessor.vendored_frameworks
|
331
|
-
begin
|
332
|
-
files += file_accessor.resources
|
333
|
-
rescue
|
334
|
-
end
|
335
|
-
|
336
|
-
FileUtils.mkdir_p(destination)
|
337
|
-
files.each do |file|
|
338
|
-
FileUtils.cp_r(file, destination)
|
339
|
-
end
|
340
|
-
end
|
341
|
-
end
|
302
|
+
raise Pod::Informative, 'The build directory was not found in the expected location.' unless build_dir.directory?
|
303
|
+
|
304
|
+
specs = installer_context.umbrella_targets.map { |t| t.specs.map(&:name) }.flatten.map { |t| t.split("/").first }.uniq
|
305
|
+
built_count = Dir["#{build_dir}/*"].select { |t| specs.include?(File.basename(t)) }.count
|
306
|
+
Pod::UI.puts "Built #{built_count} #{'items'.pluralize(built_count)}, copying..."
|
307
|
+
|
308
|
+
base_destination.rmtree if base_destination.directory?
|
342
309
|
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
310
|
+
installer_context.umbrella_targets.each do |umbrella|
|
311
|
+
umbrella.specs.each do |spec|
|
312
|
+
root_name = spec.name.split("/").first
|
313
|
+
|
314
|
+
if uses_frameworks
|
315
|
+
destination = File.join(base_destination, root_name)
|
316
|
+
else
|
317
|
+
destination = File.join(base_destination, root_name, root_name)
|
347
318
|
end
|
319
|
+
# Make sure the device target overwrites anything in the simulator build, otherwise iTunesConnect
|
320
|
+
# can get upset about Info.plist containing references to the simulator SDK
|
321
|
+
files = Pathname.glob("build/#{root_name}/*").reject { |f| f.to_s =~ /Pods[^.]+\.framework/ }
|
348
322
|
|
349
|
-
|
350
|
-
|
323
|
+
consumer = spec.consumer(umbrella.platform_name)
|
324
|
+
file_accessor = Pod::Sandbox::FileAccessor.new(sandbox.pod_dir(spec.root.name), consumer)
|
325
|
+
files += file_accessor.vendored_libraries
|
326
|
+
files += file_accessor.vendored_frameworks
|
327
|
+
files += file_accessor.resources
|
351
328
|
|
329
|
+
FileUtils.mkdir_p(destination)
|
352
330
|
files.each do |file|
|
353
|
-
|
354
|
-
|
355
|
-
FileUtils.rm_rf(file)
|
356
|
-
end
|
357
|
-
end
|
331
|
+
FileUtils.cp_r(file, destination)
|
332
|
+
end
|
358
333
|
end
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
else
|
366
|
-
raise "Not implemented"
|
334
|
+
end
|
335
|
+
|
336
|
+
# Depending on the resource it may happen that it is present twice, both in the .framework and in the parent folder
|
337
|
+
Dir.glob("#{base_destination}/*") do |path|
|
338
|
+
unless File.directory?(path)
|
339
|
+
return
|
367
340
|
end
|
368
341
|
|
369
|
-
|
342
|
+
files = Dir.glob("#{path}/*")
|
343
|
+
framework_files = Dir.glob("#{path}/*.framework/**/*").map { |t| File.basename(t) }
|
370
344
|
|
371
|
-
|
372
|
-
|
345
|
+
files.each do |file|
|
346
|
+
filename = File.basename(file.gsub(/\.xib$/, ".nib"))
|
347
|
+
if framework_files.include?(filename)
|
348
|
+
FileUtils.rm_rf(file)
|
349
|
+
end
|
350
|
+
end
|
351
|
+
end
|
352
|
+
|
353
|
+
if enable_dsym
|
354
|
+
dsym_source = "#{build_dir}/dSYM"
|
355
|
+
if File.directory?(dsym_source)
|
356
|
+
FileUtils.mv(dsym_source, sandbox_root.parent)
|
373
357
|
end
|
358
|
+
else
|
359
|
+
raise "Not implemented"
|
360
|
+
end
|
361
|
+
|
362
|
+
build_dir.rmtree if build_dir.directory?
|
363
|
+
|
364
|
+
if user_options["post_compile"]
|
365
|
+
user_options["post_compile"].call(installer_context)
|
374
366
|
end
|
375
|
-
|
367
|
+
end
|
data/lib/pod_builder/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pod-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Camin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -229,9 +229,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
229
229
|
version: '2.6'
|
230
230
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
231
231
|
requirements:
|
232
|
-
- - "
|
232
|
+
- - ">="
|
233
233
|
- !ruby/object:Gem::Version
|
234
|
-
version:
|
234
|
+
version: '0'
|
235
235
|
requirements: []
|
236
236
|
rubygems_version: 3.1.2
|
237
237
|
signing_key:
|