pod-builder 5.1.4 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b85a52e3ba807b8439a542523ff6e38744c83d297356a395dbaf2574c8f43ba
4
- data.tar.gz: de67f37c0e7aea4cc9f3d6f221f794134d61ba2a46e1b2c8dd2ae00c927bee4f
3
+ metadata.gz: 2a195ea19893b53adf9bffdd392dfc0c71b96448ba87f9431e91350f5aaf928a
4
+ data.tar.gz: 2ab6e876ef84047c0c813025eef5681643ddc64fe3a79b96e2e732732646a945
5
5
  SHA512:
6
- metadata.gz: 2736c6181c7e2efb50721cd6d3ad3897e57376d042452ec9b54e3edb44700555e160ccb62cff2b633d82b7a75cf9a9b0dfab2bf1549206b08a03146ecdee1735
7
- data.tar.gz: 48105f7082152c2a0edcf79eee64f0bdccd536f6fcc389823073520754ebec45ce350d50f52af9f4e86ece11632fc5f8417e9ec182025d229d6c458073ee706e
6
+ metadata.gz: 2a8cb5a1d34c4991308160ec49483eefa0f731b3af7894429d41580da2b20b49ca0c8513e1a9ba8ee293f67ff316f83e93b273bf57754b4107294283bc7e1499
7
+ data.tar.gz: 640ec2216ddf0d6e880e14589b4bed129a86203b05a291f242dd12ed1ccde4a7e7d98a68b00e3a6eb7ddc46abdf830f8f1ee450597f16d6d3c1a1732286b6e42
data/README.md CHANGED
@@ -242,6 +242,18 @@ You may want to skip some pods to be prebuilt, you can do that as follows:
242
242
  }
243
243
  ```
244
244
 
245
+ #### `skip_build_configuration_check`
246
+
247
+ PodBuilder performs validation checks to prevent building pods that are marked to be built with different build configurations. In some edge case scenarious you might want to skip these checks as follows:
248
+
249
+ ```json
250
+ {
251
+ "skip_build_configuration_check": [
252
+ "PodA"
253
+ ]
254
+ }
255
+ ```
256
+
245
257
 
246
258
  #### `force_prebuild_pods`
247
259
 
@@ -232,6 +232,8 @@ module PodBuilder
232
232
  end
233
233
 
234
234
  def self.check_dependencies_build_configurations(pods)
235
+ pods = pods.reject { |t| Configuration::skip_build_configuration_check.include?(t.name) }
236
+
235
237
  pods.each do |pod|
236
238
  pod_dependency_names = pod.dependency_names.select { |x| !pod.has_common_spec(x) }
237
239
 
@@ -241,7 +243,9 @@ module PodBuilder
241
243
  pods_with_unaligned_build_configuration = pods_with_common_deps.select { |x| x.build_configuration != pod.build_configuration }
242
244
  pods_with_unaligned_build_configuration.map!(&:name)
243
245
 
244
- raise "\n\nDependencies of `#{pod.name}` don't have the same build configuration (#{pod.build_configuration}) of `#{pods_with_unaligned_build_configuration.join(",")}`'s dependencies\n".red if pods_with_unaligned_build_configuration.count > 0
246
+ if pods_with_unaligned_build_configuration.count > 0
247
+ raise "\n\nDependencies of `#{pod.name}` don't have the same build configuration (#{pod.build_configuration}) of `#{pods_with_unaligned_build_configuration.join(",")}`'s dependencies\n".red
248
+ end
245
249
  end
246
250
  end
247
251
 
@@ -54,6 +54,7 @@ module PodBuilder
54
54
  attr_accessor :spec_overrides
55
55
  attr_accessor :skip_licenses
56
56
  attr_accessor :skip_pods
57
+ attr_accessor :skip_build_configuration_check
57
58
  attr_accessor :force_prebuild_pods
58
59
  attr_accessor :license_filename
59
60
  attr_accessor :development_pods_paths
@@ -94,6 +95,7 @@ module PodBuilder
94
95
  @base_path = "PodBuilder" # Not nice. This value is used only for initial initization. Once config is loaded it will be an absolute path. FIXME
95
96
  @skip_licenses = []
96
97
  @skip_pods = ["GoogleMaps", "React-RCTFabric", "React-Core", "React-CoreModules", "FBReactNativeSpec", "fmt", "RCT-Folly", "React-jsi"] # Not including React-RCTNetwork might loose some debug warnings
98
+ @skip_build_configuration_check = []
97
99
  @force_prebuild_pods = []
98
100
  @license_filename = "Pods-acknowledgements"
99
101
  @development_pods_paths = []
@@ -167,6 +169,11 @@ module PodBuilder
167
169
  Configuration.skip_pods = value
168
170
  end
169
171
  end
172
+ if value = json["skip_build_configuration_check"]
173
+ if value.is_a?(Array)
174
+ Configuration.skip_build_configuration_check = value
175
+ end
176
+ end
170
177
  if value = json["force_prebuild_pods"]
171
178
  if value.is_a?(Array)
172
179
  Configuration.force_prebuild_pods = value
@@ -313,6 +320,7 @@ module PodBuilder
313
320
  config["spec_overrides"] = Configuration.spec_overrides
314
321
  config["skip_licenses"] = Configuration.skip_licenses
315
322
  config["skip_pods"] = Configuration.skip_pods
323
+ config["skip_build_configuration_check"] = Configuration.skip_build_configuration_check
316
324
  config["force_prebuild_pods"] = Configuration.force_prebuild_pods
317
325
  config["build_settings"] = Configuration.build_settings
318
326
  config["build_settings_overrides"] = Configuration.build_settings_overrides
@@ -1,4 +1,4 @@
1
- require 'json'
1
+ require "json"
2
2
 
3
3
  module PodBuilder
4
4
  class Info
@@ -7,57 +7,57 @@ module PodBuilder
7
7
  result = {}
8
8
  name = nil
9
9
 
10
- Dir.glob(PodBuilder::prebuiltpath("**/#{Configuration.prebuilt_info_filename}")).each do |json_path|
10
+ Dir.glob(PodBuilder::prebuiltpath("**/#{Configuration.prebuilt_info_filename}")).each do |json_path|
11
11
  name, prebuilt_info = prebuilt_info(json_path)
12
12
  result[name] = prebuilt_info
13
13
  end
14
14
 
15
15
  return result
16
16
  end
17
-
17
+
18
18
  private
19
19
 
20
20
  def self.pod_name_from_entry(line)
21
21
  if (matches = line&.match(/pod '(.*?)'/)) && matches.size == 2
22
22
  pod_name = matches[1]
23
-
23
+
24
24
  return pod_name
25
25
  end
26
26
 
27
27
  return "unknown_podname"
28
28
  end
29
-
29
+
30
30
  def self.version_info_from_entry(line)
31
31
  if (matches = line&.match(/pod '(.*)', '=(.*)'/)) && matches.size == 3
32
32
  pod_name = matches[1]
33
33
  tag = matches[2]
34
-
34
+
35
35
  return { "tag": tag }
36
36
  elsif (matches = line&.match(/pod '(.*)', :git => '(.*)', :commit => '(.*)'/)) && matches.size == 4
37
37
  pod_name = matches[1]
38
38
  repo = matches[2]
39
39
  hash = matches[3]
40
-
40
+
41
41
  return { "repo": repo, "hash": hash }
42
42
  elsif (matches = line&.match(/pod '(.*)', :git => '(.*)', :branch => '(.*)'/)) && matches.size == 4
43
43
  pod_name = matches[1]
44
44
  repo = matches[2]
45
45
  branch = matches[3]
46
-
46
+
47
47
  return { "repo": repo, "branch": branch }
48
48
  elsif (matches = line&.match(/pod '(.*)', :git => '(.*)', :tag => '(.*)'/)) && matches.size == 4
49
49
  pod_name = matches[1]
50
50
  repo = matches[2]
51
51
  tag = matches[3]
52
-
52
+
53
53
  return { "repo": repo, "tag": tag }
54
54
  elsif (matches = line&.match(/pod '(.*)', :path => '(.*)'/)) && matches.size == 3
55
55
  pod_name = matches[1]
56
-
56
+
57
57
  return { "repo": "local" }
58
58
  elsif (matches = line&.match(/pod '(.*)', :podspec => '(.*)'/)) && matches.size == 3
59
59
  pod_name = matches[1]
60
-
60
+
61
61
  return { "repo": "local" }
62
62
  else
63
63
  raise "\n\nFailed extracting version from line:\n#{line}\n".red
@@ -70,21 +70,22 @@ module PodBuilder
70
70
  end
71
71
 
72
72
  data = JSON.load(File.read(path))
73
-
73
+
74
74
  result = {}
75
75
  if swift_version = data["swift_version"]
76
- result.merge!({ "swift_version": swift_version})
76
+ result.merge!({ "swift_version": swift_version })
77
77
  end
78
-
78
+
79
79
  pod_version = version_info_from_entry(data["entry"])
80
80
  pod_name = pod_name_from_entry(data["entry"])
81
81
 
82
82
  result.merge!({ "version": pod_version })
83
83
  result.merge!({ "specs": (data["specs"] || []) })
84
84
  result.merge!({ "is_static": (data["is_static"] || false) })
85
+ result.merge!({ "pb_version": (data["pb_version"] || "0.0.0") })
85
86
  result.merge!({ "original_compile_path": (data["original_compile_path"] || "") })
86
-
87
+
87
88
  return pod_name, result
88
- end
89
+ end
89
90
  end
90
- end
91
+ end
@@ -70,7 +70,7 @@ module PodBuilder
70
70
 
71
71
  copy_prebuilt_items(podfile_items - prebuilt_entries)
72
72
 
73
- prebuilt_info = prebuilt_info(podfile_items)
73
+ prebuilt_info = prebuilt_info(podfile_items, argument_pods)
74
74
  licenses = license_specifiers()
75
75
 
76
76
  if !OPTIONS.has_key?(:debug)
@@ -99,7 +99,7 @@ module PodBuilder
99
99
  end
100
100
  end
101
101
 
102
- def self.prebuilt_info(podfile_items)
102
+ def self.prebuilt_info(podfile_items, argument_pods)
103
103
  gitignored_files = PodBuilder::gitignoredfiles
104
104
 
105
105
  swift_version = PodBuilder::system_swift_version
@@ -138,6 +138,9 @@ module PodBuilder
138
138
  if hash = build_folder_hash(podfile_item, gitignored_files)
139
139
  data["build_folder_hash"] = hash
140
140
  end
141
+ if argument_pods.include?(podfile_item.root_name)
142
+ data["pb_version"] = PodBuilder::VERSION
143
+ end
141
144
 
142
145
  ret.merge!({ podbuilder_file => data })
143
146
  end
@@ -111,12 +111,12 @@ module PodBuilder
111
111
  to = "./" + Pathname.new(to).relative_path_from(Pathname.new(git_rootpath)).to_s
112
112
 
113
113
  if from.start_with?("/tmp")
114
- other_swift_flags_override += " -coverage-prefix-map \"/private#{from}\"=\"#{to}\""
115
- other_c_flags_override += " -fcoverage-prefix-map=\"/private#{from}\"=\"#{to}\""
114
+ other_swift_flags_override += " -coverage-prefix-map \"/private#{from}/\"=\"#{to}/\""
115
+ other_c_flags_override += " -fcoverage-prefix-map=\"/private#{from}/\"=\"#{to}/\""
116
+ else
117
+ other_swift_flags_override += " -coverage-prefix-map \"#{from}/\"=\"#{to}/\""
118
+ other_c_flags_override += " -fcoverage-prefix-map=\"#{from}/\"=\"#{to}/\""
116
119
  end
117
-
118
- other_swift_flags_override += " -coverage-prefix-map \"#{from}\"=\"#{to}\""
119
- other_c_flags_override += " -fcoverage-prefix-map=\"#{from}\"=\"#{to}\""
120
120
  end
121
121
  end
122
122
 
@@ -1,3 +1,3 @@
1
1
  module PodBuilder
2
- VERSION = "5.1.4"
2
+ VERSION = "5.2.0"
3
3
  end
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: 5.1.4
4
+ version: 5.2.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: 2023-03-28 00:00:00.000000000 Z
11
+ date: 2023-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler