pod-builder 4.4.0 → 4.4.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 +4 -4
- data/README.md +5 -0
- data/lib/pod_builder/command/init.rb +5 -1
- data/lib/pod_builder/command/switch.rb +17 -2
- data/lib/pod_builder/command/switch_all.rb +15 -0
- data/lib/pod_builder/command.rb +1 -0
- data/lib/pod_builder/core.rb +3 -0
- data/lib/pod_builder/install.rb +0 -10
- data/lib/pod_builder/podfile.rb +45 -1
- data/lib/pod_builder/podfile_item.rb +5 -2
- data/lib/pod_builder/version.rb +1 -1
- 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: 1ce4f8ed01f414eae4049301ada8917ab64473de0100f57687e6a6b091ee10f6
|
4
|
+
data.tar.gz: db1a4206f1eb68e3281bb896cfac29e5e5c9217cf430f507e89bda6fb936af41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9347b71f5502f7a4969e583e5074eacbf7ae57feadb9d832f23fd6f5eb405087f11c0e308d72b78258a22026ba15a282cd6e3b549727b31eb202a1d2f5480d4
|
7
|
+
data.tar.gz: 8803048b4c022e71dfd129325f22ad8d8f49a698f831fe3ec1af9224a630f50f3dbc3cba308a20a6ec764c2da23be23a3b24c870498d0b0a510d98392926419e
|
data/README.md
CHANGED
@@ -71,6 +71,7 @@ PodBuilder comes with a rich set of commands:
|
|
71
71
|
- `restore_all`: rebuilts all pods declared in the Restore-Podfile file
|
72
72
|
- `install_sources`: installs sources of pods to debug into prebuild frameworks
|
73
73
|
- `switch`: switch between prebuilt, development or standard pod in the Application-Podfile
|
74
|
+
- `switch_all`: switch all pods between prebuilt, development or standard in the Application-Podfile
|
74
75
|
- `clean`: removes unused prebuilt frameworks, dSYMs and source files added by install_sources
|
75
76
|
- `sync_podfile`: updates the Application-Podfile with all pods declared in the PodBuilder-Podfile file
|
76
77
|
- `info`: outputs json-formatted information reflecting the current status of prebuilt pods
|
@@ -158,6 +159,10 @@ To support development pods you should specify the path(s) that contain the pods
|
|
158
159
|
|
159
160
|
PodBuilder will automatically determine the proper path when switching a particular pod.
|
160
161
|
|
162
|
+
#### `switch_all` command
|
163
|
+
|
164
|
+
As `switch` but will switch all pods defined in PodBuilder-Podfile.
|
165
|
+
|
161
166
|
#### `clean` command
|
162
167
|
|
163
168
|
Deletes all unused files by PodBuilder, including .frameworks, .dSYMs and _Source_ repos.
|
@@ -65,6 +65,10 @@ module PodBuilder
|
|
65
65
|
source_path_rel_path,
|
66
66
|
development_pods_config_rel_path]
|
67
67
|
|
68
|
+
if Configuration.react_native_project
|
69
|
+
git_ignores.push("build/")
|
70
|
+
end
|
71
|
+
|
68
72
|
File.write("#{OPTIONS[:prebuild_path]}/.gitignore", git_ignores.join("\n"))
|
69
73
|
end
|
70
74
|
|
@@ -141,7 +145,7 @@ module PodBuilder
|
|
141
145
|
expected_header_search_path_prefix = "\"HEADER_SEARCH_PATHS\" => \""
|
142
146
|
raise "\n\nExpected header search path entry not found\n".red unless content.include?(expected_header_search_path_prefix)
|
143
147
|
|
144
|
-
content.sub!(expected_header_search_path_prefix, "#{expected_header_search_path_prefix}\\\"$(PODS_ROOT)/Headers/Public/Flipper-Folly\\\" ")
|
148
|
+
content.sub!(expected_header_search_path_prefix, "#{expected_header_search_path_prefix}\\\"$(PODS_ROOT)/Headers/Public/Flipper-Folly\\\" \\\"$(PODS_ROOT)/../build/generated/ios\\\" ")
|
145
149
|
File.write(paths[0], content)
|
146
150
|
end
|
147
151
|
end
|
@@ -9,7 +9,22 @@ module PodBuilder
|
|
9
9
|
PodBuilder::prepare_basepath
|
10
10
|
|
11
11
|
argument_pods = ARGV.dup
|
12
|
-
|
12
|
+
switch_all = argument_pods.first == "*"
|
13
|
+
|
14
|
+
if switch_all
|
15
|
+
pods = []
|
16
|
+
podspecs = Dir.glob("#{PodBuilder::prebuiltpath}/**/*.podspec")
|
17
|
+
podspecs.each do |podspec|
|
18
|
+
spec = Pod::Specification.from_file(podspec)
|
19
|
+
podname = spec.attributes_hash["name"]
|
20
|
+
pods.push(podname)
|
21
|
+
end
|
22
|
+
argument_pods = pods
|
23
|
+
if OPTIONS[:switch_mode] == "development"
|
24
|
+
argument_pods.reject! { |pod_name| self.find_podspec(pod_name).nil? }
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
13
28
|
unless argument_pods.count > 0
|
14
29
|
return -1
|
15
30
|
end
|
@@ -235,7 +250,7 @@ module PodBuilder
|
|
235
250
|
if Pathname.new(path).relative?
|
236
251
|
path = PodBuilder::basepath(path)
|
237
252
|
end
|
238
|
-
podspec_paths = Dir.glob(File.expand_path("#{path}/**/#{podname}
|
253
|
+
podspec_paths = Dir.glob(File.expand_path("#{path}/**/#{podname}.podspec"))
|
239
254
|
podspec_paths.select! { |t| !t.include?("/Local Podspecs/") }
|
240
255
|
podspec_paths.select! { |t| Dir.glob(File.join(File.dirname(t), "*")).count > 1 } # exclude podspec folder (which has one file per folder)
|
241
256
|
if podspec_paths.count > 1
|
data/lib/pod_builder/command.rb
CHANGED
@@ -9,6 +9,7 @@ require 'pod_builder/command/deintegrate'
|
|
9
9
|
require 'pod_builder/command/generate_podspec'
|
10
10
|
require 'pod_builder/command/install_sources'
|
11
11
|
require 'pod_builder/command/switch'
|
12
|
+
require 'pod_builder/command/switch_all'
|
12
13
|
require 'pod_builder/command/sync_podfile'
|
13
14
|
require 'pod_builder/command/info'
|
14
15
|
require 'pod_builder/command/generate_lldbinit'
|
data/lib/pod_builder/core.rb
CHANGED
data/lib/pod_builder/install.rb
CHANGED
@@ -198,8 +198,6 @@ module PodBuilder
|
|
198
198
|
gitignored_files = PodBuilder::gitignoredfiles
|
199
199
|
|
200
200
|
swift_version = PodBuilder::system_swift_version
|
201
|
-
|
202
|
-
write_prebuilt_info_filename_gitattributes
|
203
201
|
|
204
202
|
ret = Hash.new
|
205
203
|
root_names = podfile_items.reject(&:is_prebuilt).map(&:root_name).uniq
|
@@ -441,14 +439,6 @@ module PodBuilder
|
|
441
439
|
FileUtils.cp_r(PodBuilder::buildpath_dsympath, PodBuilder::basepath)
|
442
440
|
end
|
443
441
|
end
|
444
|
-
|
445
|
-
def self.write_prebuilt_info_filename_gitattributes
|
446
|
-
gitattributes_path = PodBuilder::basepath(".gitattributes")
|
447
|
-
expected_attributes = ["#{Configuration.configuration_filename} binary"].join
|
448
|
-
unless File.exists?(gitattributes_path) && File.read(gitattributes_path).include?(expected_attributes)
|
449
|
-
File.write(gitattributes_path, expected_attributes, mode: 'a')
|
450
|
-
end
|
451
|
-
end
|
452
442
|
|
453
443
|
def self.build_folder_hash_in_prebuilt_info_file(podfile_item)
|
454
444
|
prebuilt_info_path = PodBuilder::prebuiltpath(File.join(podfile_item.root_name, Configuration.prebuilt_info_filename))
|
data/lib/pod_builder/podfile.rb
CHANGED
@@ -727,6 +727,15 @@ module PodBuilder
|
|
727
727
|
|
728
728
|
def self.prepare_react_native_compilation_workarounds(podfile_content)
|
729
729
|
return podfile_content + """
|
730
|
+
|
731
|
+
def prepare_rn_react_codegen
|
732
|
+
# Beginning with version 0.68.0 react native project compilation relies on some autogenerated files
|
733
|
+
# that are added to the React-Codegen target
|
734
|
+
source_path = \"#{PodBuilder::project_path}/build/generated/ios/.\"
|
735
|
+
destination_path = \"#{PodBuilder::basepath}/build/generated/ios\"
|
736
|
+
FileUtils.cp_r(source_path, destination_path)
|
737
|
+
end
|
738
|
+
|
730
739
|
def prepare_rn_compilation_libevent
|
731
740
|
path = \"Pods/libevent/include/event.h\"
|
732
741
|
replace(path, \"#include <evutil.h>\", \"// #include <evutil.h>\")
|
@@ -745,11 +754,46 @@ def replace(path, find, replace)
|
|
745
754
|
content = File.read(path).gsub(find, replace)
|
746
755
|
File.write(path, content)
|
747
756
|
end
|
748
|
-
end
|
757
|
+
end
|
758
|
+
|
759
|
+
pre_install do |installer|
|
760
|
+
require 'json'
|
761
|
+
|
762
|
+
pods_path = \"#{PodBuilder::project_path}/Pods\"
|
763
|
+
j = JSON.parse(File.read(\"\#{pods_path}/Local Podspecs/FBReactNativeSpec.podspec.json\"))
|
764
|
+
|
765
|
+
output_files = j.dig(\"script_phases\", \"output_files\")
|
766
|
+
|
767
|
+
script_lines = j.dig(\"script_phases\", \"script\").split(\"\\n\")
|
768
|
+
script_lines.insert(0, \"export SCRIPT_OUTPUT_FILE_0=\\\"\#{output_files[0]}\\\"\")
|
769
|
+
script_lines.insert(0, \"export DERIVED_FILE_DIR=/tmp\")
|
770
|
+
script_lines.insert(0, \"export PODS_TARGET_SRCROOT=\\\"#{PodBuilder::project_path}/../node_modules/react-native/React/FBReactNativeSpec\\\"\")
|
771
|
+
script_lines.insert(0, \"export PODS_ROOT=\\\"\#{pods_path}\\\"\")
|
772
|
+
|
773
|
+
Dir.chdir(pods_path) do
|
774
|
+
cmd = script_lines.reject(&:blank?).join(\";\\n\")
|
775
|
+
system(cmd)
|
776
|
+
end
|
777
|
+
end
|
749
778
|
|
750
779
|
post_install do |installer|
|
751
780
|
prepare_rn_compilation_libevent()
|
752
781
|
prepare_rn_flipper_module_redefinition()
|
782
|
+
prepare_rn_react_codegen()
|
783
|
+
|
784
|
+
installer.pods_project.targets.each do |target|
|
785
|
+
target.build_configurations.each do |config|
|
786
|
+
if target.name == 'React-Codegen'
|
787
|
+
config.build_settings['HEADER_SEARCH_PATHS'] = config.build_settings.fetch('HEADER_SEARCH_PATHS', []) + ['$(inherited)', '${PODS_ROOT}/Flipper-Folly', '${PODS_ROOT}/React-Core/ReactCommon', '$(PODS_ROOT)/React-Core/ReactCommon/react/renderer/graphics/platform/cxx', '$(PODS_ROOT)/React-Codegen/build/generated/ios']
|
788
|
+
end
|
789
|
+
if target.name == 'React-Core'
|
790
|
+
config.build_settings['HEADER_SEARCH_PATHS'] = config.build_settings.fetch('HEADER_SEARCH_PATHS', []) + ['$(inherited)', '${PODS_ROOT}/Flipper-Folly']
|
791
|
+
end
|
792
|
+
if target.name == 'React-CoreModules'
|
793
|
+
config.build_settings['HEADER_SEARCH_PATHS'] = config.build_settings.fetch('HEADER_SEARCH_PATHS', []) + ['$(inherited)', '${PODS_ROOT}/Flipper-Folly', '$(PODS_ROOT)/../build/generated/ios']
|
794
|
+
end
|
795
|
+
end
|
796
|
+
end
|
753
797
|
end
|
754
798
|
"""
|
755
799
|
end
|
@@ -375,12 +375,13 @@ module PodBuilder
|
|
375
375
|
def entry(include_version = true, include_pb_entry = true)
|
376
376
|
e = "pod '#{@name}'"
|
377
377
|
|
378
|
+
e_suffix = ""
|
378
379
|
if !is_prebuilt && inhibit_warnings
|
379
|
-
|
380
|
+
e_suffix = ", :inhibit_warnings => true"
|
380
381
|
end
|
381
382
|
|
382
383
|
unless include_version
|
383
|
-
return e
|
384
|
+
return e + e_suffix
|
384
385
|
end
|
385
386
|
|
386
387
|
if is_external
|
@@ -406,6 +407,8 @@ module PodBuilder
|
|
406
407
|
e += ", '=#{@version}'"
|
407
408
|
end
|
408
409
|
|
410
|
+
e += e_suffix
|
411
|
+
|
409
412
|
if include_pb_entry && !is_prebuilt
|
410
413
|
prebuilt_info_path = PodBuilder::prebuiltpath("#{root_name}/#{Configuration::prebuilt_info_filename}")
|
411
414
|
if File.exist?(prebuilt_info_path)
|
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: 4.4.
|
4
|
+
version: 4.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Camin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -197,6 +197,7 @@ files:
|
|
197
197
|
- lib/pod_builder/command/none.rb
|
198
198
|
- lib/pod_builder/command/restore_all.rb
|
199
199
|
- lib/pod_builder/command/switch.rb
|
200
|
+
- lib/pod_builder/command/switch_all.rb
|
200
201
|
- lib/pod_builder/command/sync_podfile.rb
|
201
202
|
- lib/pod_builder/command/update.rb
|
202
203
|
- lib/pod_builder/configuration.rb
|