pod-builder 2.0.0.beta.34 → 2.0.0.beta.35

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: 31aa509b926c753841f3739996fad1be623bac4ceee8ae30ae9b1ee254f2ddb3
4
- data.tar.gz: 56df221c8e00be54c33cfa491629d0d13a22087108d8722a8bf925cbd85e959e
3
+ metadata.gz: 037b4a3f456716c55d38e1ec98307ff27e87b97c908dd5e80e5895e9686f6e3f
4
+ data.tar.gz: 82dbc45cb9220beb68fe1b76c26ac11f6f8d45927e35fa73ecdd754609742830
5
5
  SHA512:
6
- metadata.gz: 3b55c31c20f5e676ff8c004d233449cbd57acac51d2fb7925340e7e25c949e9c72743ba2683255b34e5ea72bf13da5394b39f2cd0383fa95d82f9ebbb263c948
7
- data.tar.gz: 05e76c637a0dcb3856698ce8f144e9ca734e4463edfe19ed9677c87dee7447b473da3e0918fb7c0c79f78b90604938ebe7d2b22ba1826f74377fb808ba77818e
6
+ metadata.gz: d067c51f54eea74198b8d9ae7a85a25d271666ca3301836ab14920f52c5d9dc47aae4dfafea4de43953c09b5d15cbede4f7bcd0841772c55e7a6f057e61a737b
7
+ data.tar.gz: 504fd2e0adec760b4a58d26bec752b3dcf7755b425a0b109662e8cc4e852387b21d003c6d2abbe87e3d92d40412c9d544eb2c2bc65f41ae9e9a94a5e1eec58c3
@@ -76,8 +76,8 @@ Options:
76
76
  opts.on("-w", "--allow-warnings", "Allow warnings") do |o|
77
77
  OPTIONS[:allow_warnings] = o
78
78
  end
79
- opts.on("-a", "--auto-resolve-deps", "Include all pods that depend on the specified <PODNAME...>") do |o|
80
- OPTIONS[:auto_resolve_dependencies] = o
79
+ opts.on("-r", "--parent-deps", "Include all pods that depend on the specified <PODNAME...>") do |o|
80
+ OPTIONS[:resolve_parent_dependencies] = true
81
81
  end
82
82
  opts.on("-s", "--no-stdin", "Never request interaction with sdtin (e.g. in CI environment)") do |o|
83
83
  OPTIONS[:no_stdin_available] = o
@@ -282,7 +282,7 @@ Usage:
282
282
  opts.banner = "
283
283
  Usage:
284
284
 
285
- $ pod_builder switch [OPTIONS] PODNAME[s]
285
+ $ pod_builder switch [OPTIONS] <PODNAME...>
286
286
 
287
287
  Switch integration between prebuilt/development/default pod version. Multiple space separated pods can be passed
288
288
 
@@ -297,8 +297,14 @@ Options:
297
297
  opts.on("-s", "--default", "Default version specified in PodBuilder-Podfile") do |o|
298
298
  OPTIONS[:switch_mode] = "default"
299
299
  end
300
- opts.on("-a", "--all", "Include dependencies") do |o|
301
- OPTIONS[:switch_all] = true
300
+ opts.on("-c", "--child-deps", "Include dependencies of the specified <PODNAME...>") do |o|
301
+ OPTIONS[:resolve_child_dependencies] = true
302
+ end
303
+ opts.on("-r", "--parent-deps", "Include all pods that depend on the specified <PODNAME...>") do |o|
304
+ OPTIONS[:resolve_parent_dependencies] = true
305
+ end
306
+ opts.on("-u", "--skip-repo-update", "Skip CocoaPods repo update (only when passing --parent-deps") do |o|
307
+ OPTIONS[:update_repos] = false
302
308
  end
303
309
  end,
304
310
  :call => [
@@ -73,7 +73,9 @@ module PodBuilder
73
73
 
74
74
  install_using_frameworks = Podfile::install_using_frameworks(analyzer)
75
75
 
76
- unless install_using_frameworks
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 if Configuration.react_native_project
78
+ else
77
79
  prepare_defines_modules_override(all_buildable_items)
78
80
  end
79
81
 
@@ -162,7 +164,7 @@ module PodBuilder
162
164
  end
163
165
 
164
166
  def self.check_not_building_development_pods(pods)
165
- if (development_pods = pods.select { |x| x.is_development_pod }) && development_pods.count > 0 && (OPTIONS[:allow_warnings].nil? && Configuration.allow_building_development_pods == false)
167
+ if (development_pods = pods.select { |x| x.is_development_pod }) && development_pods.count > 0 && (OPTIONS[:allow_warnings].nil? && Configuration.allow_building_development_pods == false && Configuration.react_native_project == false)
166
168
  pod_names = development_pods.map(&:name).join(", ")
167
169
  raise "\n\nThe following pods are in development mode: `#{pod_names}`, won't proceed building.\n\nYou can ignore this error by passing the `--allow-warnings` flag to the build command\n".red
168
170
  end
@@ -199,7 +201,7 @@ module PodBuilder
199
201
  pods_to_build = buildable_items.select { |x| argument_pods.include?(x.root_name) }
200
202
  pods_to_build += other_subspecs(pods_to_build, buildable_items)
201
203
 
202
- if OPTIONS[:auto_resolve_dependencies]
204
+ if OPTIONS[:resolve_parent_dependencies]
203
205
  dependencies = []
204
206
  buildable_items.each do |pod|
205
207
  if !(pod.dependencies(buildable_items) & pods_to_build).empty?
@@ -24,8 +24,29 @@ module PodBuilder
24
24
  pod_names_to_switch.push(pod_name_to_switch)
25
25
  end
26
26
 
27
+ if OPTIONS[:resolve_parent_dependencies] == true
28
+ install_update_repo = OPTIONS.fetch(:update_repos, true)
29
+ installer, analyzer = Analyze.installer_at(PodBuilder::basepath, install_update_repo)
30
+
31
+ all_buildable_items = Analyze.podfile_items(installer, analyzer)
32
+
33
+ pod_names_to_switch.each do |pod_name|
34
+ if pod = (all_buildable_items.detect { |t| t.name == pod_name } || all_buildable_items.detect { |t| t.root_name == pod_name })
35
+ dependencies = []
36
+ all_buildable_items.each do |pod|
37
+ if !(pod.dependency_names & pod_names_to_switch).empty?
38
+ dependencies.push(pod.root_name)
39
+ end
40
+ end
41
+ pod_names_to_switch += dependencies
42
+ end
43
+ end
44
+
45
+ pod_names_to_switch.uniq!
46
+ end
47
+
27
48
  dep_pod_names_to_switch = []
28
- if OPTIONS[:switch_all] == true
49
+ if OPTIONS[:resolve_child_dependencies] == true
29
50
  pod_names_to_switch.each do |pod|
30
51
  podspec_path = PodBuilder::prebuiltpath("#{pod}/#{pod}.podspec")
31
52
  unless File.exist?(podspec_path)
@@ -35,7 +35,7 @@ module PodBuilder
35
35
  ARGV.clear
36
36
  pods_to_update.each { |x| ARGV << x }
37
37
 
38
- # OPTIONS[:auto_resolve_dependencies] = true
38
+ # OPTIONS[:resolve_parent_dependencies] = true
39
39
  return PodBuilder::Command::Build.call
40
40
  end
41
41
  end
@@ -395,7 +395,7 @@ module PodBuilder
395
395
  target_settings = analyzer.podfile.target_definition_list.map(&:uses_frameworks?).uniq
396
396
  if target_settings.count == 1
397
397
  if target_settings.first == false && ENV["DEBUGGING"].nil?
398
- raise "\n\nOnly framework packaging currently supported. Please add 'use_frameworks!' at Podfile root level (not nested in targets)".red
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
399
  end
400
400
  return target_settings.first
401
401
  elsif target_settings.count > 1
@@ -328,7 +328,10 @@ Pod::HooksManager.register('podbuilder-rome', :post_install) do |installer_conte
328
328
  file_accessor = Pod::Sandbox::FileAccessor.new(sandbox.pod_dir(spec.root.name), consumer)
329
329
  files += file_accessor.vendored_libraries
330
330
  files += file_accessor.vendored_frameworks
331
- files += file_accessor.resources
331
+ begin
332
+ files += file_accessor.resources
333
+ rescue
334
+ end
332
335
 
333
336
  FileUtils.mkdir_p(destination)
334
337
  files.each do |file|
@@ -1,4 +1,4 @@
1
1
  module PodBuilder
2
- VERSION = "2.0.0.beta.34"
2
+ VERSION = "2.0.0.beta.35"
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: 2.0.0.beta.34
4
+ version: 2.0.0.beta.35
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-10-12 00:00:00.000000000 Z
11
+ date: 2020-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler