cocoapods 1.6.2 → 1.7.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +101 -7
  3. data/README.md +9 -9
  4. data/lib/cocoapods.rb +2 -0
  5. data/lib/cocoapods/command.rb +1 -1
  6. data/lib/cocoapods/command/init.rb +2 -12
  7. data/lib/cocoapods/command/install.rb +3 -0
  8. data/lib/cocoapods/command/lib/create.rb +1 -1
  9. data/lib/cocoapods/command/lib/lint.rb +5 -1
  10. data/lib/cocoapods/command/list.rb +3 -5
  11. data/lib/cocoapods/command/repo.rb +1 -0
  12. data/lib/cocoapods/command/repo/add.rb +4 -5
  13. data/lib/cocoapods/command/repo/add_cdn.rb +58 -0
  14. data/lib/cocoapods/command/repo/list.rb +5 -6
  15. data/lib/cocoapods/command/repo/push.rb +6 -5
  16. data/lib/cocoapods/command/spec/create.rb +12 -12
  17. data/lib/cocoapods/command/spec/lint.rb +1 -1
  18. data/lib/cocoapods/command/update.rb +3 -0
  19. data/lib/cocoapods/config.rb +1 -0
  20. data/lib/cocoapods/executable.rb +32 -7
  21. data/lib/cocoapods/gem_version.rb +1 -1
  22. data/lib/cocoapods/generator/app_target_helper.rb +1 -1
  23. data/lib/cocoapods/generator/embed_frameworks_script.rb +13 -0
  24. data/lib/cocoapods/generator/file_list.rb +39 -0
  25. data/lib/cocoapods/generator/module_map.rb +1 -1
  26. data/lib/cocoapods/installer.rb +188 -46
  27. data/lib/cocoapods/installer/analyzer.rb +64 -39
  28. data/lib/cocoapods/installer/analyzer/pod_variant.rb +14 -9
  29. data/lib/cocoapods/installer/analyzer/pod_variant_set.rb +11 -2
  30. data/lib/cocoapods/installer/installation_options.rb +70 -44
  31. data/lib/cocoapods/installer/pod_source_installer.rb +9 -4
  32. data/lib/cocoapods/installer/podfile_validator.rb +9 -0
  33. data/lib/cocoapods/installer/post_install_hooks_context.rb +5 -2
  34. data/lib/cocoapods/installer/project_cache/project_cache.rb +11 -0
  35. data/lib/cocoapods/installer/project_cache/project_cache_analysis_result.rb +53 -0
  36. data/lib/cocoapods/installer/project_cache/project_cache_analyzer.rb +156 -0
  37. data/lib/cocoapods/installer/project_cache/project_cache_version.rb +43 -0
  38. data/lib/cocoapods/installer/project_cache/project_installation_cache.rb +77 -0
  39. data/lib/cocoapods/installer/project_cache/project_metadata_cache.rb +63 -0
  40. data/lib/cocoapods/installer/project_cache/target_cache_key.rb +134 -0
  41. data/lib/cocoapods/installer/project_cache/target_metadata.rb +70 -0
  42. data/lib/cocoapods/installer/sandbox_dir_cleaner.rb +89 -0
  43. data/lib/cocoapods/installer/sandbox_header_paths_installer.rb +45 -0
  44. data/lib/cocoapods/installer/target_uuid_generator.rb +32 -0
  45. data/lib/cocoapods/installer/user_project_integrator.rb +8 -6
  46. data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +128 -63
  47. data/lib/cocoapods/installer/xcode.rb +3 -0
  48. data/lib/cocoapods/installer/xcode/multi_pods_project_generator.rb +72 -0
  49. data/lib/cocoapods/installer/xcode/pods_project_generator.rb +102 -218
  50. data/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_dependency_installer.rb +75 -0
  51. data/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb +1 -1
  52. data/lib/cocoapods/installer/xcode/pods_project_generator/app_host_installer.rb +29 -17
  53. data/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb +31 -65
  54. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_dependency_installer.rb +155 -0
  55. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb +265 -110
  56. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb +70 -43
  57. data/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb +75 -0
  58. data/lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb +119 -0
  59. data/lib/cocoapods/installer/xcode/pods_project_generator/target_installation_result.rb +44 -7
  60. data/lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb +5 -7
  61. data/lib/cocoapods/installer/xcode/pods_project_generator/target_installer_helper.rb +32 -0
  62. data/lib/cocoapods/installer/xcode/pods_project_generator_result.rb +35 -0
  63. data/lib/cocoapods/installer/xcode/single_pods_project_generator.rb +38 -0
  64. data/lib/cocoapods/installer/xcode/target_validator.rb +32 -25
  65. data/lib/cocoapods/native_target_extension.rb +54 -0
  66. data/lib/cocoapods/open-uri.rb +1 -1
  67. data/lib/cocoapods/podfile.rb +13 -0
  68. data/lib/cocoapods/project.rb +88 -10
  69. data/lib/cocoapods/resolver.rb +11 -8
  70. data/lib/cocoapods/resolver/resolver_specification.rb +7 -7
  71. data/lib/cocoapods/sandbox.rb +38 -9
  72. data/lib/cocoapods/sandbox/file_accessor.rb +21 -0
  73. data/lib/cocoapods/sandbox/headers_store.rb +18 -3
  74. data/lib/cocoapods/sandbox/pod_dir_cleaner.rb +1 -14
  75. data/lib/cocoapods/sources_manager.rb +11 -3
  76. data/lib/cocoapods/target.rb +67 -7
  77. data/lib/cocoapods/target/aggregate_target.rb +70 -8
  78. data/lib/cocoapods/target/build_settings.rb +124 -65
  79. data/lib/cocoapods/target/build_type.rb +139 -0
  80. data/lib/cocoapods/target/framework_paths.rb +12 -7
  81. data/lib/cocoapods/target/pod_target.rb +322 -65
  82. data/lib/cocoapods/user_interface.rb +2 -2
  83. data/lib/cocoapods/user_interface/error_report.rb +3 -0
  84. data/lib/cocoapods/user_interface/inspector_reporter.rb +1 -1
  85. data/lib/cocoapods/validator.rb +74 -39
  86. data/lib/cocoapods/version_metadata.rb +7 -0
  87. metadata +30 -6
@@ -1,4 +1,5 @@
1
1
  require 'molinillo'
2
+ require 'cocoapods/podfile'
2
3
 
3
4
  module Pod
4
5
  class NoSpecFoundError < Informative
@@ -14,10 +15,6 @@ module Pod
14
15
  require 'cocoapods/resolver/lazy_specification'
15
16
  require 'cocoapods/resolver/resolver_specification'
16
17
 
17
- include Pod::Installer::InstallationOptions::Mixin
18
-
19
- delegate_installation_options { podfile }
20
-
21
18
  # @return [Sandbox] the Sandbox used by the resolver to find external
22
19
  # dependencies.
23
20
  #
@@ -109,10 +106,10 @@ module Pod
109
106
  resolver_specs_by_target[target] = vertices.
110
107
  map do |vertex|
111
108
  payload = vertex.payload
112
- test_only = (!explicit_dependencies.include?(vertex.name) || payload.test_specification?) &&
109
+ non_library = (!explicit_dependencies.include?(vertex.name) || payload.test_specification? || payload.app_specification?) &&
113
110
  (vertex.recursive_predecessors & vertices).all? { |v| !explicit_dependencies.include?(v.name) || v.payload.test_specification? }
114
111
  spec_source = payload.respond_to?(:spec_source) && payload.spec_source
115
- ResolverSpecification.new(payload, test_only, spec_source)
112
+ ResolverSpecification.new(payload, non_library, spec_source)
116
113
  end.
117
114
  sort_by(&:name)
118
115
  end
@@ -333,7 +330,7 @@ module Pod
333
330
  def specifications_for_dependency(dependency, additional_requirements = [])
334
331
  requirement = Requirement.new(dependency.requirement.as_list + additional_requirements.flat_map(&:as_list))
335
332
  find_cached_set(dependency).
336
- all_specifications(installation_options.warn_for_multiple_pod_sources).
333
+ all_specifications(warn_for_multiple_pod_sources).
337
334
  select { |s| requirement.satisfied_by? s.version }.
338
335
  map { |s| s.subspec_by_name(dependency.name, false, true) }.
339
336
  compact
@@ -504,7 +501,7 @@ Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by
504
501
  #
505
502
  # @param [Dependency] dependency
506
503
  #
507
- # @param [Specification] specification
504
+ # @param [Specification] spec
508
505
  #
509
506
  # @return [Bool]
510
507
  def spec_is_platform_compatible?(dependency_graph, dependency, spec)
@@ -574,5 +571,11 @@ Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by
574
571
 
575
572
  @edge_validity[EdgeAndPlatform.new(edge, target_platform)]
576
573
  end
574
+
575
+ # @return [Boolean] whether to emit a warning when a pod is found in multiple sources
576
+ #
577
+ def warn_for_multiple_pod_sources
578
+ podfile.installation_options.warn_for_multiple_pod_sources
579
+ end
577
580
  end
578
581
  end
@@ -12,14 +12,14 @@ module Pod
12
12
  #
13
13
  attr_reader :source
14
14
 
15
- # @return [Bool] whether this resolved specification is only used by tests.
15
+ # @return [Bool] whether this resolved specification is by non-library targets.
16
16
  #
17
- attr_reader :used_by_tests_only
18
- alias used_by_tests_only? used_by_tests_only
17
+ attr_reader :used_by_non_library_targets_only
18
+ alias used_by_non_library_targets_only? used_by_non_library_targets_only
19
19
 
20
- def initialize(spec, used_by_tests_only, source)
20
+ def initialize(spec, used_by_non_library_targets_only, source)
21
21
  @spec = spec
22
- @used_by_tests_only = used_by_tests_only
22
+ @used_by_non_library_targets_only = used_by_non_library_targets_only
23
23
  @source = source
24
24
  end
25
25
 
@@ -33,8 +33,8 @@ module Pod
33
33
 
34
34
  def ==(other)
35
35
  self.class == other.class &&
36
- spec == other.spec &&
37
- used_by_tests_only? == other.used_by_tests_only?
36
+ spec == other.spec &&
37
+ used_by_non_library_targets_only? == other.used_by_non_library_targets_only?
38
38
  end
39
39
  end
40
40
  end
@@ -34,6 +34,14 @@ module Pod
34
34
  # +-- Manifest.lock
35
35
  # |
36
36
  # +-- Pods.xcodeproj
37
+ # (if installation option 'generate_multiple_pod_projects' is enabled)
38
+ # |
39
+ # +-- PodTarget1.xcodeproj
40
+ # |
41
+ # ...
42
+ # |
43
+ # +-- PodTargetN.xcodeproj
44
+ #
37
45
  #
38
46
  class Sandbox
39
47
  autoload :FileAccessor, 'cocoapods/sandbox/file_accessor'
@@ -66,20 +74,14 @@ module Pod
66
74
  end
67
75
 
68
76
  # @return [Lockfile] the manifest which contains the information about the
69
- # installed pods.
77
+ # installed pods or `nil` if one is not present.
70
78
  #
71
- attr_accessor :manifest
72
-
73
79
  def manifest
74
80
  @manifest ||= begin
75
81
  Lockfile.from_file(manifest_path) if manifest_path.exist?
76
82
  end
77
83
  end
78
84
 
79
- # @return [Project] the Pods project.
80
- #
81
- attr_accessor :project
82
-
83
85
  # Removes the files of the Pod with the given name from the sandbox.
84
86
  #
85
87
  # @return [void]
@@ -92,14 +94,14 @@ module Pod
92
94
  end
93
95
  podspec_path = specification_path(name)
94
96
  podspec_path.rmtree if podspec_path
97
+ pod_target_project_path = pod_target_project_path(name)
98
+ pod_target_project_path.rmtree if pod_target_project_path.exist?
95
99
  end
96
100
 
97
101
  # Prepares the sandbox for a new installation removing any file that will
98
102
  # be regenerated and ensuring that the directories exists.
99
103
  #
100
104
  def prepare
101
- FileUtils.rm_rf(headers_root)
102
-
103
105
  FileUtils.mkdir_p(headers_root)
104
106
  FileUtils.mkdir_p(sources_root)
105
107
  FileUtils.mkdir_p(specifications_root)
@@ -130,6 +132,33 @@ module Pod
130
132
  root + 'Pods.xcodeproj'
131
133
  end
132
134
 
135
+ # @return [Pathname] the path of the installation cache.
136
+ #
137
+ def project_installation_cache_path
138
+ root.join('.project_cache', 'installation_cache.yaml')
139
+ end
140
+
141
+ # @return [Pathname] the path of the metadata cache.
142
+ #
143
+ def project_metadata_cache_path
144
+ root.join('.project_cache', 'metadata_cache.yaml')
145
+ end
146
+
147
+ # @return [Pathname] the path of the version cache.
148
+ #
149
+ def project_version_cache_path
150
+ root.join('.project_cache', 'version')
151
+ end
152
+
153
+ # @param [String] pod_target_name
154
+ # Name of the pod target used to generate the path of its Xcode project.
155
+ #
156
+ # @return [Pathname] the path of the project for a pod target.
157
+ #
158
+ def pod_target_project_path(pod_target_name)
159
+ root + "#{pod_target_name}.xcodeproj"
160
+ end
161
+
133
162
  # Returns the path for the directory where the support files of
134
163
  # a target are stored.
135
164
  #
@@ -179,6 +179,27 @@ module Pod
179
179
  vendored_frameworks - vendored_dynamic_frameworks
180
180
  end
181
181
 
182
+ # @param [Array<FileAccessor>] file_accessors
183
+ # The list of all file accessors to compute.
184
+ #
185
+ # @return [Array<String>] The list of all file accessors that a target will integrate into the project.
186
+ #
187
+ def self.all_files(file_accessors)
188
+ files = [
189
+ file_accessors.map(&:vendored_frameworks),
190
+ file_accessors.map(&:vendored_libraries),
191
+ file_accessors.map(&:resource_bundle_files),
192
+ file_accessors.map(&:license),
193
+ file_accessors.map(&:prefix_header),
194
+ file_accessors.map(&:preserve_paths),
195
+ file_accessors.map(&:readme),
196
+ file_accessors.map(&:resources),
197
+ file_accessors.map(&:source_files),
198
+ file_accessors.map(&:module_map),
199
+ ]
200
+ files.flatten.compact.map(&:to_s).uniq
201
+ end
202
+
182
203
  # @param [Pathname] framework
183
204
  # The vendored framework to search into.
184
205
  # @return [Pathname] The path of the header directory of the
@@ -66,8 +66,7 @@ module Pod
66
66
  end.tap(&:uniq!).freeze
67
67
  end
68
68
 
69
- # Removes the directory as it is regenerated from scratch during each
70
- # installation.
69
+ # Removes the entire root directory.
71
70
  #
72
71
  # @return [void]
73
72
  #
@@ -75,6 +74,18 @@ module Pod
75
74
  root.rmtree if root.exist?
76
75
  end
77
76
 
77
+ # Removes the directory at the given path relative to the root.
78
+ #
79
+ # @param [Pathname] path
80
+ # The path used to join with #root and remove.
81
+ #
82
+ # @return [void]
83
+ #
84
+ def implode_path!(path)
85
+ path = root.join(path)
86
+ path.rmtree if path.exist?
87
+ end
88
+
78
89
  #-----------------------------------------------------------------------#
79
90
 
80
91
  public
@@ -122,7 +133,11 @@ module Pod
122
133
 
123
134
  absolute_source = (sandbox.root + relative_header_path)
124
135
  source = absolute_source.relative_path_from(namespaced_path)
125
- FileUtils.ln_sf(source, namespaced_path)
136
+ if Gem.win_platform?
137
+ FileUtils.ln(absolute_source, namespaced_path, :force => true)
138
+ else
139
+ FileUtils.ln_sf(source, namespaced_path)
140
+ end
126
141
  namespaced_path + relative_header_path.basename
127
142
  end
128
143
 
@@ -65,20 +65,7 @@ module Pod
65
65
  # specifications (according to their platform) of this Pod.
66
66
  #
67
67
  def used_files
68
- files = [
69
- file_accessors.map(&:vendored_frameworks),
70
- file_accessors.map(&:vendored_libraries),
71
- file_accessors.map(&:resource_bundle_files),
72
- file_accessors.map(&:license),
73
- file_accessors.map(&:prefix_header),
74
- file_accessors.map(&:preserve_paths),
75
- file_accessors.map(&:readme),
76
- file_accessors.map(&:resources),
77
- file_accessors.map(&:source_files),
78
- file_accessors.map(&:module_map),
79
- ]
80
-
81
- files.flatten.compact.map(&:to_s).uniq
68
+ FileAccessor.all_files(file_accessors)
82
69
  end
83
70
  end
84
71
  end
@@ -21,8 +21,13 @@ module Pod
21
21
  previous_title_level = UI.title_level
22
22
  UI.title_level = 0
23
23
  begin
24
- if name =~ /^master(-\d+)?$/
24
+ case
25
+ when name =~ /^master(-\d+)?$/
25
26
  Command::Setup.parse([]).run
27
+ when url =~ /\.git$/
28
+ Command::Repo::Add.parse([name, url]).run
29
+ when url =~ %r{^https:\/\/}
30
+ Command::Repo::AddCDN.parse([name, url]).run
26
31
  else
27
32
  Command::Repo::Add.parse([name, url]).run
28
33
  end
@@ -98,8 +103,11 @@ module Pod
98
103
  extend Executable
99
104
  executable :git
100
105
 
101
- def git(args, include_error: false)
102
- Executable.capture_command('git', args, :capture => include_error ? :merge : :out).first.strip
106
+ def repo_git(args, include_error: false)
107
+ Executable.capture_command('git', ['-C', repo] + args,
108
+ :capture => include_error ? :merge : :out,
109
+ :env => { 'GIT_CONFIG' => nil }).
110
+ first.strip
103
111
  end
104
112
 
105
113
  def update_git_repo(show_output = false)
@@ -1,4 +1,5 @@
1
1
  require 'cocoapods/target/build_settings'
2
+ require 'cocoapods/target/build_type'
2
3
 
3
4
  module Pod
4
5
  # Model class which describes a Pods target.
@@ -40,6 +41,11 @@ module Pod
40
41
  #
41
42
  attr_reader :build_settings
42
43
 
44
+ # @return [Type] the build type for this target.
45
+ #
46
+ attr_reader :build_type
47
+ private :build_type
48
+
43
49
  # Initialize a new target
44
50
  #
45
51
  # @param [Sandbox] sandbox @see #sandbox
@@ -48,12 +54,14 @@ module Pod
48
54
  # @param [Array<String>] archs @see #archs
49
55
  # @param [Platform] platform @see #platform
50
56
  #
51
- def initialize(sandbox, host_requires_frameworks, user_build_configurations, archs, platform)
57
+ def initialize(sandbox, host_requires_frameworks, user_build_configurations, archs, platform,
58
+ build_type: Target::BuildType.infer_from_spec(nil, :host_requires_frameworks => host_requires_frameworks?))
52
59
  @sandbox = sandbox
53
60
  @host_requires_frameworks = host_requires_frameworks
54
61
  @user_build_configurations = user_build_configurations
55
62
  @archs = archs
56
63
  @platform = platform
64
+ @build_type = build_type
57
65
 
58
66
  @build_settings = create_build_settings
59
67
  end
@@ -84,10 +92,60 @@ module Pod
84
92
  false
85
93
  end
86
94
 
95
+ # @return [Boolean] whether the target is built dynamically
96
+ #
97
+ def build_as_dynamic?
98
+ build_type.dynamic?
99
+ end
100
+
101
+ # @return [Boolean] whether the target is built as a dynamic framework
102
+ #
103
+ def build_as_dynamic_framework?
104
+ build_type.dynamic_framework?
105
+ end
106
+
107
+ # @return [Boolean] whether the target is built as a dynamic library
108
+ #
109
+ def build_as_dynamic_library?
110
+ build_type.dynamic_library?
111
+ end
112
+
113
+ # @return [Boolean] whether the target is built as a framework
114
+ #
115
+ def build_as_framework?
116
+ build_type.framework?
117
+ end
118
+
119
+ # @return [Boolean] whether the target is built as a library
120
+ #
121
+ def build_as_library?
122
+ build_type.library?
123
+ end
124
+
125
+ # @return [Boolean] whether the target is built statically
126
+ #
127
+ def build_as_static?
128
+ build_type.static?
129
+ end
130
+
131
+ # @return [Boolean] whether the target is built as a static framework
132
+ #
133
+ def build_as_static_framework?
134
+ build_type.static_framework?
135
+ end
136
+
137
+ # @return [Boolean] whether the target is built as a static library
138
+ #
139
+ def build_as_static_library?
140
+ build_type.static_library?
141
+ end
142
+
143
+ # @deprecated Prefer {build_as_static_framework?}.
144
+ #
87
145
  # @return [Boolean] Whether the target should build a static framework.
88
146
  #
89
147
  def static_framework?
90
- false
148
+ build_as_static_framework?
91
149
  end
92
150
 
93
151
  # @return [String] the name to use for the source code module constructed
@@ -101,7 +159,7 @@ module Pod
101
159
  # @return [String] the name of the product.
102
160
  #
103
161
  def product_name
104
- if requires_frameworks?
162
+ if build_as_framework?
105
163
  framework_name
106
164
  else
107
165
  static_library_name
@@ -113,7 +171,7 @@ module Pod
113
171
  # and #product_module_name or #label.
114
172
  #
115
173
  def product_basename
116
- if requires_frameworks?
174
+ if build_as_framework?
117
175
  product_module_name
118
176
  else
119
177
  label
@@ -139,10 +197,10 @@ module Pod
139
197
  end
140
198
 
141
199
  # @return [Symbol] either :framework or :static_library, depends on
142
- # #requires_frameworks?.
200
+ # #build_as_framework?.
143
201
  #
144
202
  def product_type
145
- requires_frameworks? ? :framework : :static_library
203
+ build_as_framework? ? :framework : :static_library
146
204
  end
147
205
 
148
206
  # @return [String] A string suitable for debugging.
@@ -155,11 +213,13 @@ module Pod
155
213
 
156
214
  # @!group Framework support
157
215
 
216
+ # @deprecated Prefer {build_as_framework?}.
217
+ #
158
218
  # @return [Boolean] whether the generated target needs to be implemented
159
219
  # as a framework
160
220
  #
161
221
  def requires_frameworks?
162
- host_requires_frameworks? || false
222
+ build_as_framework?
163
223
  end
164
224
 
165
225
  #-------------------------------------------------------------------------#
@@ -64,10 +64,12 @@ module Pod
64
64
  # @param [Xcodeproj::Project] user_project @see #user_project
65
65
  # @param [Array<String>] user_target_uuids @see #user_target_uuids
66
66
  # @param [Hash{String=>Array<PodTarget>}] pod_targets_for_build_configuration @see #pod_targets_for_build_configuration
67
+ # @param [Target::BuildType] build_type @see #build_type
67
68
  #
68
69
  def initialize(sandbox, host_requires_frameworks, user_build_configurations, archs, platform, target_definition,
69
- client_root, user_project, user_target_uuids, pod_targets_for_build_configuration)
70
- super(sandbox, host_requires_frameworks, user_build_configurations, archs, platform)
70
+ client_root, user_project, user_target_uuids, pod_targets_for_build_configuration,
71
+ build_type: Target::BuildType.infer_from_spec(nil, :host_requires_frameworks => host_requires_frameworks))
72
+ super(sandbox, host_requires_frameworks, user_build_configurations, archs, platform, :build_type => build_type)
71
73
  raise "Can't initialize an AggregateTarget without a TargetDefinition!" if target_definition.nil?
72
74
  raise "Can't initialize an AggregateTarget with an abstract TargetDefinition!" if target_definition.abstract?
73
75
  @target_definition = target_definition
@@ -93,7 +95,7 @@ module Pod
93
95
  (before + after).uniq
94
96
  end
95
97
  AggregateTarget.new(sandbox, host_requires_frameworks, user_build_configurations, archs, platform,
96
- target_definition, client_root, user_project, user_target_uuids, merged).tap do |aggregate_target|
98
+ target_definition, client_root, user_project, user_target_uuids, merged, :build_type => build_type).tap do |aggregate_target|
97
99
  aggregate_target.search_paths_aggregate_targets.concat(search_paths_aggregate_targets).freeze
98
100
  end
99
101
  end
@@ -233,8 +235,8 @@ module Pod
233
235
  user_build_configurations.keys.each do |config|
234
236
  relevant_pod_targets = pod_targets_for_build_configuration(config)
235
237
  framework_paths_by_config[config] = relevant_pod_targets.flat_map do |pod_target|
236
- non_test_specs = pod_target.non_test_specs.map(&:name)
237
- pod_target.framework_paths.values_at(*non_test_specs).flatten.compact.uniq
238
+ library_specs = pod_target.library_specs.map(&:name)
239
+ pod_target.framework_paths.values_at(*library_specs).flatten.compact.uniq
238
240
  end
239
241
  end
240
242
  framework_paths_by_config
@@ -246,13 +248,13 @@ module Pod
246
248
  def resource_paths_by_config
247
249
  @resource_paths_by_config ||= begin
248
250
  relevant_pod_targets = pod_targets.reject do |pod_target|
249
- pod_target.should_build? && pod_target.requires_frameworks? && !pod_target.static_framework?
251
+ pod_target.should_build? && pod_target.build_as_dynamic_framework?
250
252
  end
251
253
  user_build_configurations.keys.each_with_object({}) do |config, resources_by_config|
252
254
  targets = relevant_pod_targets & pod_targets_for_build_configuration(config)
253
255
  resources_by_config[config] = targets.flat_map do |pod_target|
254
- non_test_specs = pod_target.non_test_specs.map(&:name)
255
- resource_paths = pod_target.resource_paths.values_at(*non_test_specs).flatten
256
+ library_specs = pod_target.library_specs.map(&:name)
257
+ resource_paths = pod_target.resource_paths.values_at(*library_specs).flatten
256
258
  resource_paths << bridge_support_file
257
259
  resource_paths.compact.uniq
258
260
  end
@@ -286,12 +288,44 @@ module Pod
286
288
  support_files_dir + "#{label}-resources.sh"
287
289
  end
288
290
 
291
+ # @param [String] configuration the configuration this path is for.
292
+ #
293
+ # @return [Pathname] The absolute path of the copy resources script input file list.
294
+ #
295
+ def copy_resources_script_input_files_path(configuration)
296
+ support_files_dir + "#{label}-resources-#{configuration}-input-files.xcfilelist"
297
+ end
298
+
299
+ # @param [String] configuration the configuration this path is for.
300
+ #
301
+ # @return [Pathname] The absolute path of the copy resources script output file list.
302
+ #
303
+ def copy_resources_script_output_files_path(configuration)
304
+ support_files_dir + "#{label}-resources-#{configuration}-output-files.xcfilelist"
305
+ end
306
+
289
307
  # @return [Pathname] The absolute path of the embed frameworks script.
290
308
  #
291
309
  def embed_frameworks_script_path
292
310
  support_files_dir + "#{label}-frameworks.sh"
293
311
  end
294
312
 
313
+ # @param [String] configuration the configuration this path is for.
314
+ #
315
+ # @return [Pathname] The absolute path of the embed frameworks script input file list.
316
+ #
317
+ def embed_frameworks_script_input_files_path(configuration)
318
+ support_files_dir + "#{label}-frameworks-#{configuration}-input-files.xcfilelist"
319
+ end
320
+
321
+ # @param [String] configuration the configuration this path is for.
322
+ #
323
+ # @return [Pathname] The absolute path of the embed frameworks script output file list.
324
+ #
325
+ def embed_frameworks_script_output_files_path(configuration)
326
+ support_files_dir + "#{label}-frameworks-#{configuration}-output-files.xcfilelist"
327
+ end
328
+
295
329
  # @return [String] The output file path fo the check manifest lock script.
296
330
  #
297
331
  def check_manifest_lock_script_output_file_path
@@ -336,6 +370,20 @@ module Pod
336
370
  "${PODS_ROOT}/#{relative_to_pods_root(copy_resources_script_path)}"
337
371
  end
338
372
 
373
+ # @return [String] The path of the copy resources script input file list
374
+ # relative to the root of the Pods project.
375
+ #
376
+ def copy_resources_script_input_files_relative_path
377
+ "${PODS_ROOT}/#{relative_to_pods_root(copy_resources_script_input_files_path('${CONFIGURATION}'))}"
378
+ end
379
+
380
+ # @return [String] The path of the copy resources script output file list
381
+ # relative to the root of the Pods project.
382
+ #
383
+ def copy_resources_script_output_files_relative_path
384
+ "${PODS_ROOT}/#{relative_to_pods_root(copy_resources_script_output_files_path('${CONFIGURATION}'))}"
385
+ end
386
+
339
387
  # @return [String] The path of the embed frameworks relative to the
340
388
  # root of the Pods project.
341
389
  #
@@ -343,6 +391,20 @@ module Pod
343
391
  "${PODS_ROOT}/#{relative_to_pods_root(embed_frameworks_script_path)}"
344
392
  end
345
393
 
394
+ # @return [String] The path of the embed frameworks script input file list
395
+ # relative to the root of the Pods project.
396
+ #
397
+ def embed_frameworks_script_input_files_relative_path
398
+ "${PODS_ROOT}/#{relative_to_pods_root(embed_frameworks_script_input_files_path('${CONFIGURATION}'))}"
399
+ end
400
+
401
+ # @return [String] The path of the embed frameworks script output file list
402
+ # relative to the root of the Pods project.
403
+ #
404
+ def embed_frameworks_script_output_files_relative_path
405
+ "${PODS_ROOT}/#{relative_to_pods_root(embed_frameworks_script_output_files_path('${CONFIGURATION}'))}"
406
+ end
407
+
346
408
  private
347
409
 
348
410
  # @!group Private Helpers