pod-builder 3.0.0 → 3.4.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 +23 -5
- data/exe/pod_builder +0 -3
- data/lib/pod_builder/analyze.rb +12 -13
- data/lib/pod_builder/command/build.rb +73 -23
- data/lib/pod_builder/command/deintegrate.rb +11 -9
- data/lib/pod_builder/command/generate_lldbinit.rb +1 -1
- data/lib/pod_builder/command/init.rb +7 -6
- data/lib/pod_builder/command/install_sources.rb +9 -11
- data/lib/pod_builder/command/switch.rb +37 -16
- data/lib/pod_builder/command/sync_podfile.rb +11 -11
- data/lib/pod_builder/command/update.rb +0 -1
- data/lib/pod_builder/configuration.rb +10 -2
- data/lib/pod_builder/core.rb +4 -3
- data/lib/pod_builder/info.rb +1 -1
- data/lib/pod_builder/install.rb +65 -37
- data/lib/pod_builder/licenses.rb +4 -4
- data/lib/pod_builder/podfile.rb +21 -15
- data/lib/pod_builder/podfile/pre_actions_swizzles.rb +1 -1
- data/lib/pod_builder/podfile_item.rb +69 -36
- data/lib/pod_builder/podspec.rb +1 -1
- data/lib/pod_builder/post_actions.rb +46 -0
- data/lib/pod_builder/rome/post_install.rb +11 -11
- data/lib/pod_builder/version.rb +1 -1
- metadata +4 -3
data/lib/pod_builder/podspec.rb
CHANGED
@@ -142,7 +142,7 @@ module PodBuilder
|
|
142
142
|
end
|
143
143
|
if !install_using_frameworks && spec_var == "p1" && vendored_libraries.map { |t| File.basename(t) }.include?("lib#{item.root_name}.a" )
|
144
144
|
module_path_files = Dir.glob(PodBuilder.prebuiltpath("#{item.root_name}/**/#{item.root_name}.modulemap"))
|
145
|
-
raise "\n\nToo many module maps found for #{item.root_name}".red if module_path_files.count > 1
|
145
|
+
raise "\n\nToo many module maps found for #{item.root_name}\n".red if module_path_files.count > 1
|
146
146
|
|
147
147
|
rel_path = Pathname.new(PodBuilder::prebuiltpath).relative_path_from(Pathname.new(PodBuilder::project_path("Pods"))).to_s
|
148
148
|
prebuilt_root_var = "#{item.root_name.upcase.gsub("-", "_")}_PREBUILT_ROOT"
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'pod_builder/core'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module PodBuilder
|
5
|
+
module PostActions
|
6
|
+
def self.load(hash)
|
7
|
+
actions = {}
|
8
|
+
if json = hash["switch"]
|
9
|
+
actions[:switch] = Item.new("switch", json)
|
10
|
+
end
|
11
|
+
if json = hash["build"]
|
12
|
+
actions[:build] = Item.new("build", json)
|
13
|
+
end
|
14
|
+
|
15
|
+
return actions
|
16
|
+
end
|
17
|
+
|
18
|
+
class Item
|
19
|
+
attr_reader :path
|
20
|
+
attr_reader :quiet
|
21
|
+
attr_reader :name
|
22
|
+
|
23
|
+
def initialize(name, hash)
|
24
|
+
@name = name
|
25
|
+
@path = hash.fetch("path", "")
|
26
|
+
@quiet = hash.fetch("quiet", false)
|
27
|
+
|
28
|
+
raise "\n\nEmpty or missing post #{name} action path\n".red if @path.empty?()
|
29
|
+
end
|
30
|
+
|
31
|
+
def execute()
|
32
|
+
cmd = PodBuilder::basepath(path)
|
33
|
+
unless File.exist?(cmd)
|
34
|
+
raise "\n\nPost #{name} action path '#{cmd}' does not exists!\n".red
|
35
|
+
end
|
36
|
+
|
37
|
+
if @quiet
|
38
|
+
cmd += " > /dev/null 2>&1"
|
39
|
+
end
|
40
|
+
|
41
|
+
puts "Executing post #{name} action".yellow
|
42
|
+
`#{cmd}`
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -21,7 +21,7 @@ module PodBuilder
|
|
21
21
|
when "tvossimulator" then @build_destination = "generic/platform=tvOS Simulator"
|
22
22
|
when "watchos" then @build_destination = "generic/platform=watchOS"
|
23
23
|
when "watchossimulator" then @build_destination = "generic/platform=watchOS Simulator"
|
24
|
-
else raise "\n\nUnknown platform '#{platform_name}'".red end
|
24
|
+
else raise "\n\nUnknown platform '#{platform_name}'\n".red end
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
@@ -65,7 +65,7 @@ module PodBuilder
|
|
65
65
|
`xcrun lipo -remove arm64 #{simulator_lib} -o #{simulator_lib}`
|
66
66
|
end
|
67
67
|
|
68
|
-
raise "
|
68
|
+
raise "\n\nLipo failed on #{device_lib}\n".red unless system("xcrun lipo -create -output #{device_lib} #{device_lib} #{simulator_lib}")
|
69
69
|
|
70
70
|
merge_header_into(device_swift_header_path, simulator_swift_header_path)
|
71
71
|
|
@@ -116,7 +116,7 @@ module PodBuilder
|
|
116
116
|
`xcrun lipo -remove arm64 #{simulator_lib} -o #{simulator_lib}`
|
117
117
|
end
|
118
118
|
|
119
|
-
raise "
|
119
|
+
raise "\n\nLipo failed on #{device_lib}\n".red unless system("xcrun lipo -create -output #{device_lib} #{device_lib} #{simulator_lib}")
|
120
120
|
|
121
121
|
device_headers = Dir.glob("#{device_base}/**/*.h")
|
122
122
|
simulator_headers = Dir.glob("#{simulator_base}/**/*.h")
|
@@ -247,7 +247,7 @@ module PodBuilder
|
|
247
247
|
output = stdout + stderr
|
248
248
|
unless status.success?
|
249
249
|
if raise_on_failure
|
250
|
-
raise "#{full_command}\n\n#{output}"
|
250
|
+
raise "\n\n#{full_command}\n\n#{output}\n".red
|
251
251
|
else
|
252
252
|
UI.message("[!] Failed: #{full_command}".red)
|
253
253
|
end
|
@@ -307,7 +307,7 @@ Pod::HooksManager.register('podbuilder-rome', :post_install) do |installer_conte
|
|
307
307
|
build_dir.rmtree if build_dir.directory?
|
308
308
|
|
309
309
|
targets = installer_context.umbrella_targets.select { |t| t.specs.any? }
|
310
|
-
raise "\n\nUnsupported target count".red unless targets.count == 1
|
310
|
+
raise "\n\nUnsupported target count\n".red unless targets.count == 1
|
311
311
|
target = targets.first
|
312
312
|
|
313
313
|
if build_xcframeworks
|
@@ -322,11 +322,11 @@ Pod::HooksManager.register('podbuilder-rome', :post_install) do |installer_conte
|
|
322
322
|
when :osx then xcodebuild_settings = [PodBuilder::XcodeBuildSettings.new("macos", configuration)]
|
323
323
|
when :tvos then xcodebuild_settings = [PodBuilder::XcodeBuildSettings.new("tvos", configuration), PodBuilder::XcodeBuildSettings.new("tvossimulator", configuration)]
|
324
324
|
when :watchos then xcodebuild_settings = [PodBuilder::XcodeBuildSettings.new("watchos", configuration), PodBuilder::XcodeBuildSettings.new("watchossimulator", configuration)]
|
325
|
-
else raise "\n\nUnknown platform '#{target.platform_name}'".red end
|
325
|
+
else raise "\n\nUnknown platform '#{target.platform_name}'\n".red end
|
326
326
|
|
327
327
|
xcodebuild_settings.each do |xcodebuild_setting|
|
328
328
|
puts "Building xcframeworks for #{xcodebuild_setting.platform_name}".yellow
|
329
|
-
raise "\n\n#{build_destination} xcframework archive failed
|
329
|
+
raise "\n\n#{xcodebuild_setting.build_destination} xcframework archive failed!\n".red if !system("xcodebuild archive -project #{project_path.to_s} -scheme Pods-DummyTarget -configuration #{xcodebuild_setting.configuration} -destination '#{xcodebuild_setting.build_destination}' -archivePath '#{build_dir}/#{xcodebuild_setting.platform_name}' SKIP_INSTALL=NO > /dev/null 2>&1")
|
330
330
|
end
|
331
331
|
|
332
332
|
built_items = Dir.glob("#{build_dir}/#{xcodebuild_settings[0].platform_name}.xcarchive/Products/Library/Frameworks/*").reject { |t| File.basename(t, ".*") == "Pods_DummyTarget" }
|
@@ -348,7 +348,7 @@ Pod::HooksManager.register('podbuilder-rome', :post_install) do |installer_conte
|
|
348
348
|
framework_name = File.basename(built_item_paths.first, ".*")
|
349
349
|
xcframework_path = "#{base_destination}/#{framework_name}/#{framework_name}.xcframework"
|
350
350
|
framework_params = built_item_paths.map { |t| "-framework '#{t}'"}.join(" ")
|
351
|
-
raise "\n\nFailed packing xcframework
|
351
|
+
raise "\n\nFailed packing xcframework!\n".red if !system("xcodebuild -create-xcframework #{framework_params} -output '#{xcframework_path}' > /dev/null 2>&1")
|
352
352
|
|
353
353
|
if enable_dsym
|
354
354
|
xcodebuild_settings.each do |xcodebuild_setting|
|
@@ -361,7 +361,7 @@ Pod::HooksManager.register('podbuilder-rome', :post_install) do |installer_conte
|
|
361
361
|
end
|
362
362
|
end
|
363
363
|
else
|
364
|
-
raise "
|
364
|
+
raise "\n\nNot implemented\n".red
|
365
365
|
end
|
366
366
|
end
|
367
367
|
|
@@ -377,7 +377,7 @@ Pod::HooksManager.register('podbuilder-rome', :post_install) do |installer_conte
|
|
377
377
|
when [:osx, false] then PodBuilder::xcodebuild(sandbox, target.cocoapods_target_label, configuration, PodBuilder::Configuration.deterministic_build, prebuilt_root_paths)
|
378
378
|
when [:tvos, false] then PodBuilder::build_for_iosish_platform_lib(sandbox, build_dir, target, 'appletvos', 'appletvsimulator', configuration, PodBuilder::Configuration.deterministic_build, prebuilt_root_paths)
|
379
379
|
when [:watchos, false] then PodBuilder::build_for_iosish_platform_lib(sandbox, build_dir, target, 'watchos', 'watchsimulator', configuration, PodBuilder::Configuration.deterministic_build, prebuilt_root_paths)
|
380
|
-
else raise "\n\nUnknown platform '#{target.platform_name}'".red end
|
380
|
+
else raise "\n\nUnknown platform '#{target.platform_name}'\n".red end
|
381
381
|
|
382
382
|
raise Pod::Informative, 'The build directory was not found in the expected location.' unless build_dir.directory?
|
383
383
|
|
@@ -436,7 +436,7 @@ Pod::HooksManager.register('podbuilder-rome', :post_install) do |installer_conte
|
|
436
436
|
FileUtils.mv(dsym_source, sandbox_root.parent)
|
437
437
|
end
|
438
438
|
else
|
439
|
-
raise "
|
439
|
+
raise "\n\nNot implemented\n".red
|
440
440
|
end
|
441
441
|
end
|
442
442
|
|
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: 3.
|
4
|
+
version: 3.4.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: 2021-
|
11
|
+
date: 2021-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -208,6 +208,7 @@ files:
|
|
208
208
|
- lib/pod_builder/podfile_cp.rb
|
209
209
|
- lib/pod_builder/podfile_item.rb
|
210
210
|
- lib/pod_builder/podspec.rb
|
211
|
+
- lib/pod_builder/post_actions.rb
|
211
212
|
- lib/pod_builder/rome/post_install.rb
|
212
213
|
- lib/pod_builder/rome/pre_install.rb
|
213
214
|
- lib/pod_builder/templates/build_podfile.template
|
@@ -233,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
234
|
- !ruby/object:Gem::Version
|
234
235
|
version: '0'
|
235
236
|
requirements: []
|
236
|
-
rubygems_version: 3.
|
237
|
+
rubygems_version: 3.0.3
|
237
238
|
signing_key:
|
238
239
|
specification_version: 4
|
239
240
|
summary: Prebuild CocoaPods pods
|