pod-builder 3.1.0 → 3.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3d2e466990adefdd924214e92d94859aefc2d8b844722b87a602a53c8650a19
4
- data.tar.gz: 59511ec436382352ed7ca9d51ee1b60d72770a24297a27afd947514afc8f789e
3
+ metadata.gz: '09cbb24dc2fb49946058f0459990c762afd54e93dfe280289203348162272611'
4
+ data.tar.gz: 87fc03146c5a8a7fbe2adcc895e8a45c8b24b517b00c557236245902df543267
5
5
  SHA512:
6
- metadata.gz: '09e89f2b8fefbc51d505f7205a9298e4298332b3442597c45d13da17efe74ee9099ded49613aa432e377d303f83e1a607735c07b16b9e3dfa91b52b556b9d43f'
7
- data.tar.gz: 6f6b831daa3db4d01feafdf73103098cf95f0c7ad3e058ec074ccf984b339605772fc799f45241a9fb6cac490499b86943e8f7f268ff43113f79276d9146ca88
6
+ metadata.gz: 221ccda81fbd9b41d4439ebaa6a8ea3776e4c1d91ea3b24d268fa54203e67e757160ad0e42595527e0e610845ec1faf546aa9d480463f808aae28c94df4710e4
7
+ data.tar.gz: ef65cce139a54a6ae93e5262e480a3608e9b268a51cf413da58e314d29568c6981f5b198dc1061d93d102ec112935dc890d7e5b009fabd0cc4cc88cce52e9650
@@ -138,6 +138,10 @@ module PodBuilder
138
138
  # @return [Bool] Should build as xcframework
139
139
  #
140
140
  attr_accessor :build_xcframework
141
+
142
+ # @return [Bool] True if it's a pod that doesn't provide source code (is already shipped as a prebuilt pod)
143
+ #
144
+ attr_accessor :is_prebuilt
141
145
 
142
146
  # Initialize a new instance
143
147
  #
@@ -246,6 +250,8 @@ module PodBuilder
246
250
  build_as_xcframework = Configuration.build_xcframeworks_include.include?(@root_name)
247
251
  end
248
252
  @build_xcframework = build_as_xcframework
253
+
254
+ @is_prebuilt = extract_is_prebuilt(spec, all_specs, checkout_options, supported_platforms)
249
255
  end
250
256
 
251
257
  def pod_specification(all_poditems, parent_spec = nil)
@@ -335,33 +341,6 @@ module PodBuilder
335
341
  return deps
336
342
  end
337
343
 
338
- # @return [Bool] True if it's a pod that doesn't provide source code (is already shipped as a prebuilt pod)
339
- #
340
- def is_prebuilt
341
- if Configuration.force_prebuild_pods.include?(@root_name) || Configuration.force_prebuild_pods.include?(@name)
342
- return false
343
- end
344
-
345
- # We treat pods to skip like prebuilt ones
346
- if Configuration.skip_pods.include?(@root_name) || Configuration.skip_pods.include?(@name)
347
- return true
348
- end
349
-
350
- # Podspecs aren't always properly written (source_file key is often used instead of header_files)
351
- # Therefore it can become tricky to understand which pods are already precompiled by boxing a .framework or .a
352
- embedded_as_vendored = vendored_frameworks.map { |x| File.basename(x) }.include?("#{module_name}.framework")
353
- embedded_as_static_lib = vendored_libraries.map { |x| File.basename(x) }.include?("lib#{module_name}.a")
354
-
355
- only_headers = (source_files.count > 0 && @source_files.all? { |x| x.end_with?(".h") })
356
- no_sources = (@source_files.count == 0 || only_headers) && (@vendored_frameworks + @vendored_libraries).count > 0
357
-
358
- if !no_sources && !only_headers
359
- return false
360
- else
361
- return (no_sources || only_headers || embedded_as_static_lib || embedded_as_vendored)
362
- end
363
- end
364
-
365
344
  # @return [Bool] True if it's a subspec
366
345
  #
367
346
  def is_subspec
@@ -472,6 +451,44 @@ module PodBuilder
472
451
 
473
452
  private
474
453
 
454
+ # @return [Bool] True if it's a pod that doesn't provide source code (is already shipped as a prebuilt pod)
455
+ #
456
+ def extract_is_prebuilt(spec, all_specs, checkout_options, supported_platforms)
457
+ if Configuration.force_prebuild_pods.include?(@root_name) || Configuration.force_prebuild_pods.include?(@name)
458
+ return false
459
+ end
460
+
461
+ # We treat pods to skip like prebuilt ones
462
+ if Configuration.skip_pods.include?(@root_name) || Configuration.skip_pods.include?(@name)
463
+ return true
464
+ end
465
+
466
+ if default_subspecs != nil && default_subspecs.count > 0
467
+ default_subspecs.each do |default_subspec_name|
468
+ if (default_spec = all_specs.detect { |t| t.name == "#{root_name}/#{default_subspec_name}" })
469
+ default_item = PodfileItem.new(default_spec, all_specs, checkout_options, supported_platforms)
470
+ if default_item.is_prebuilt
471
+ return true
472
+ end
473
+ end
474
+ end
475
+ end
476
+
477
+ # Podspecs aren't always properly written (source_file key is often used instead of header_files)
478
+ # Therefore it can become tricky to understand which pods are already precompiled by boxing a .framework or .a
479
+ embedded_as_vendored = vendored_frameworks.map { |x| File.basename(x) }.include?("#{module_name}.framework")
480
+ embedded_as_static_lib = vendored_libraries.map { |x| File.basename(x) }.include?("lib#{module_name}.a")
481
+
482
+ only_headers = (source_files.count > 0 && @source_files.all? { |x| x.end_with?(".h") })
483
+ no_sources = (@source_files.count == 0 || only_headers) && (@vendored_frameworks + @vendored_libraries).count > 0
484
+
485
+ if !no_sources && !only_headers
486
+ return false
487
+ else
488
+ return (no_sources || only_headers || embedded_as_static_lib || embedded_as_vendored)
489
+ end
490
+ end
491
+
475
492
  def extract_vendored_frameworks(spec, all_specs)
476
493
  items = []
477
494
 
@@ -1,4 +1,4 @@
1
1
  module PodBuilder
2
- VERSION = "3.1.0"
2
+ VERSION = "3.2.0"
3
3
  end
4
4
 
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.1.0
4
+ version: 3.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: 2021-05-11 00:00:00.000000000 Z
11
+ date: 2021-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler