cocoapods 0.39.0.beta.5 → 0.39.0.rc.1

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
  SHA1:
3
- metadata.gz: d34fbbd05497ec88b132304db391872b725f0976
4
- data.tar.gz: 07097a4bea5c3ddfcf65fc77de8ec0968ef8aa31
3
+ metadata.gz: b9b6307f3481f68a070b2041113029c82645970c
4
+ data.tar.gz: e2930c2cd0e469383e9f12957ea91d3e577e02ba
5
5
  SHA512:
6
- metadata.gz: e749c9394f1dc06fc4e06bb64b1e9b9d6602d9381f23a450cf8688c8a834f167a8c3b45b6a41c85e964de30db7d3614a7f3e27a4125608c9fcaa8b96d3638a56
7
- data.tar.gz: 1aaca2db33e7209f5cd93aeb44159f3fd85351aa807f2e9bd0edb6e5a1c4749ac2979f4a7fe21787398e3fe1b62a39754342d202e10f0197aa18b0d457c2ccfd
6
+ metadata.gz: d2f291a5925c5f21e2798eec82e84f90ba152b4cfdf464bd47e76dbfc1e111dd32ddf6b934b2ba9f7458f6775f61e2933a4c72af14986f74512158e9f15be846
7
+ data.tar.gz: 8cd1087485caa43c0ea13619e73f28f79f925ee92767797c3622380ec724e746223057632484020b6bede6b089fe1eb4b59f79ff29ea80816bea92f5f612c711
@@ -4,6 +4,19 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
4
4
 
5
5
  To install release candidates run `[sudo] gem install cocoapods --pre`
6
6
 
7
+ ## 0.39.0.rc.1 (2015-10-05)
8
+
9
+ ##### Enhancements
10
+
11
+ * Support for adding dependency target vendored libraries and frameworks to build settings.
12
+ [Kevin Coleman](https://github.com/kcoleman731)
13
+ [#4278](https://github.com/CocoaPods/CocoaPods/pull/4278)
14
+
15
+ * Always link the aggregate target as static to the user project.
16
+ [Marius Rackwitz](https://github.com/mrackwitz)
17
+ [#4137](https://github.com/CocoaPods/CocoaPods/pull/4137)
18
+
19
+
7
20
  ## 0.39.0.beta.5 (2015-10-01)
8
21
 
9
22
  ##### Breaking
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the cocoapods command line tool.
3
3
  #
4
- VERSION = '0.39.0.beta.5' unless defined? Pod::VERSION
4
+ VERSION = '0.39.0.rc.1' unless defined? Pod::VERSION
5
5
  end
@@ -43,7 +43,6 @@ module Pod
43
43
  target_search_paths = target.build_headers.search_paths(target.platform)
44
44
  sandbox_search_paths = target.sandbox.public_headers.search_paths(target.platform)
45
45
  search_paths = target_search_paths.concat(sandbox_search_paths).uniq
46
- framework_search_paths = target.dependent_targets.flat_map(&:file_accessors).flat_map(&:vendored_frameworks).map { |fw| '${PODS_ROOT}/' << fw.dirname.relative_path_from(target.sandbox.root).to_s }
47
46
 
48
47
  config = {
49
48
  'OTHER_LDFLAGS' => XCConfigHelper.default_ld_flags(target),
@@ -51,7 +50,7 @@ module Pod
51
50
  'HEADER_SEARCH_PATHS' => XCConfigHelper.quote(search_paths),
52
51
  'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1',
53
52
  'SKIP_INSTALL' => 'YES',
54
- 'FRAMEWORK_SEARCH_PATHS' => '$(inherited) ' << XCConfigHelper.quote(framework_search_paths)
53
+ 'FRAMEWORK_SEARCH_PATHS' => '$(inherited) '
55
54
  # 'USE_HEADERMAP' => 'NO'
56
55
  }
57
56
 
@@ -52,6 +52,26 @@ module Pod
52
52
  def self.add_settings_for_file_accessors_of_target(target, xcconfig)
53
53
  target.file_accessors.each do |file_accessor|
54
54
  XCConfigHelper.add_spec_build_settings_to_xcconfig(file_accessor.spec_consumer, xcconfig)
55
+ end
56
+ XCConfigHelper.add_vendored_dependency_build_settings(target, xcconfig)
57
+ end
58
+
59
+ # Adds build settings for vendored frameworks and libraries.
60
+ #
61
+ # @param [PodTarget] target
62
+ # The pod target, which holds the list of +Spec::FileAccessor+.
63
+ #
64
+ # @param [Xcodeproj::Config] xcconfig
65
+ # The xcconfig to edit.
66
+ #
67
+ def self.add_vendored_dependency_build_settings(target, xcconfig)
68
+ if target.requires_frameworks?
69
+ target.dependent_targets.each do |dependent_target|
70
+ XCConfigHelper.add_vendored_dependency_build_settings(dependent_target, xcconfig)
71
+ end
72
+ end
73
+
74
+ target.file_accessors.each do |file_accessor|
55
75
  file_accessor.vendored_frameworks.each do |vendored_framework|
56
76
  XCConfigHelper.add_framework_build_settings(vendored_framework, xcconfig, target.sandbox.root)
57
77
  end
@@ -91,7 +111,7 @@ module Pod
91
111
  #
92
112
  def self.add_framework_build_settings(framework_path, xcconfig, sandbox_root)
93
113
  name = File.basename(framework_path, '.framework')
94
- dirname = '$(PODS_ROOT)/' + framework_path.dirname.relative_path_from(sandbox_root).to_s
114
+ dirname = '${PODS_ROOT}/' + framework_path.dirname.relative_path_from(sandbox_root).to_s
95
115
  build_settings = {
96
116
  'OTHER_LDFLAGS' => "-framework #{name}",
97
117
  'FRAMEWORK_SEARCH_PATHS' => quote([dirname]),
@@ -113,7 +133,7 @@ module Pod
113
133
  #
114
134
  def self.add_library_build_settings(library_path, xcconfig, sandbox_root)
115
135
  name = File.basename(library_path, '.a').sub(/\Alib/, '')
116
- dirname = '$(PODS_ROOT)/' + library_path.dirname.relative_path_from(sandbox_root).to_s
136
+ dirname = '${PODS_ROOT}/' + library_path.dirname.relative_path_from(sandbox_root).to_s
117
137
  build_settings = {
118
138
  'OTHER_LDFLAGS' => "-l#{name}",
119
139
  'LIBRARY_SEARCH_PATHS' => '$(inherited) ' + quote([dirname]),
@@ -24,7 +24,7 @@ module Pod
24
24
  explicit_dependencies = lockfile.to_hash['DEPENDENCIES'] || []
25
25
  explicit_dependencies.each do |string|
26
26
  dependency = Dependency.new(string)
27
- dependency_graph.add_root_vertex(dependency.name, nil)
27
+ dependency_graph.add_vertex(dependency.name, nil, true)
28
28
  end
29
29
 
30
30
  pods = lockfile.to_hash['PODS'] || []
@@ -47,6 +47,7 @@ module Pod
47
47
  'OTHER_LIBTOOLFLAGS' => '',
48
48
  'PODS_ROOT' => '$(SRCROOT)',
49
49
  'SKIP_INSTALL' => 'YES',
50
+ 'MACH_O_TYPE' => 'staticlib',
50
51
  }
51
52
  super.merge(settings)
52
53
  end
@@ -127,13 +127,36 @@ module Pod
127
127
  # @todo This can be removed for CocoaPods 1.0
128
128
  #
129
129
  def update_to_cocoapods_0_39
130
- requires_update = native_targets_to_embed_in.any? do |target|
131
- !target.shell_script_build_phases.find { |bp| bp.name == 'Embed Pods Frameworks' }
130
+ targets_to_embed = native_targets.select do |target|
131
+ EMBED_FRAMEWORK_TARGET_TYPES.include?(target.symbol_type)
132
+ end
133
+ requires_update = targets_to_embed.any? do |target|
134
+ !target.shell_script_build_phases.find { |bp| bp.name == EMBED_FRAMEWORK_PHASE_NAME }
132
135
  end
133
136
  if requires_update
134
- add_embed_frameworks_script_phase
135
- true
137
+ targets_to_embed.each do |native_target|
138
+ add_embed_frameworks_script_phase_to_target(native_target)
139
+ end
140
+ end
141
+
142
+ frameworks = user_project.frameworks_group
143
+ native_targets.each do |native_target|
144
+ build_phase = native_target.frameworks_build_phase
145
+
146
+ product_ref = frameworks.files.find { |f| f.path == target.product_name }
147
+ if product_ref
148
+ build_file = build_phase.build_file(product_ref)
149
+ if build_file &&
150
+ build_file.settings.is_a?(Hash) &&
151
+ build_file.settings['ATTRIBUTES'].is_a?(Array) &&
152
+ build_file.settings['ATTRIBUTES'].include?('Weak')
153
+ build_file.settings = nil
154
+ requires_update = true
155
+ end
156
+ end
136
157
  end
158
+
159
+ requires_update
137
160
  end
138
161
 
139
162
  # Adds spec product reference to the frameworks build phase of the
@@ -161,15 +184,8 @@ module Pod
161
184
  target_basename = target.product_basename
162
185
  new_product_ref = frameworks.files.find { |f| f.path == target.product_name } ||
163
186
  frameworks.new_product_ref_for_target(target_basename, target.product_type)
164
- build_file = build_phase.build_file(new_product_ref) ||
187
+ build_phase.build_file(new_product_ref) ||
165
188
  build_phase.add_file_reference(new_product_ref, true)
166
- if target.requires_frameworks?
167
- # Weak link the aggregate target's product, because as it contains
168
- # no symbols, it isn't copied into the app bundle. dyld will so
169
- # never try to find the missing executable at runtime.
170
- build_file.settings ||= {}
171
- build_file.settings['ATTRIBUTES'] = ['Weak']
172
- end
173
189
  end
174
190
  end
175
191
 
@@ -179,12 +195,16 @@ module Pod
179
195
  #
180
196
  def add_embed_frameworks_script_phase
181
197
  native_targets_to_embed_in.each do |native_target|
182
- phase = create_or_update_build_phase(native_target, EMBED_FRAMEWORK_PHASE_NAME)
183
- script_path = target.embed_frameworks_script_relative_path
184
- phase.shell_script = %("#{script_path}"\n)
198
+ add_embed_frameworks_script_phase_to_target(native_target)
185
199
  end
186
200
  end
187
201
 
202
+ def add_embed_frameworks_script_phase_to_target(native_target)
203
+ phase = create_or_update_build_phase(native_target, EMBED_FRAMEWORK_PHASE_NAME)
204
+ script_path = target.embed_frameworks_script_relative_path
205
+ phase.shell_script = %("#{script_path}"\n)
206
+ end
207
+
188
208
  # Delete a 'Embed Pods Frameworks' Copy Files Build Phase if present
189
209
  #
190
210
  # @param [PBXNativeTarget] native_target
@@ -422,12 +422,9 @@ module Pod
422
422
  #
423
423
  # @return [Bool]
424
424
  def spec_is_platform_compatible?(dependency_graph, dependency, spec)
425
- all_predecessors = ->(vertex) do
426
- pred = vertex.predecessors
427
- pred + pred.map(&all_predecessors).reduce(Set.new, &:|) << vertex
428
- end
429
425
  vertex = dependency_graph.vertex_named(dependency.name)
430
- predecessors = all_predecessors[vertex].reject { |v| !dependency_graph.root_vertex_named(v.name) }
426
+ predecessors = vertex.recursive_predecessors.select(&:root)
427
+ predecessors << vertex if vertex.root?
431
428
  platforms_to_satisfy = predecessors.flat_map(&:explicit_requirements).flat_map { |r| @platforms_by_dependency[r] }
432
429
 
433
430
  platforms_to_satisfy.all? do |platform_to_satisfy|
@@ -461,9 +458,7 @@ module Pod
461
458
  def edge_is_valid_for_target?(edge, target)
462
459
  dependencies_for_target_platform =
463
460
  edge.origin.payload.all_dependencies(target.platform).map(&:name)
464
- edge.requirements.any? do |dependency|
465
- dependencies_for_target_platform.include?(dependency.name)
466
- end
461
+ dependencies_for_target_platform.include?(edge.requirement.name)
467
462
  end
468
463
  end
469
464
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.39.0.beta.5
4
+ version: 0.39.0.rc.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-10-01 00:00:00.000000000 Z
14
+ date: 2015-10-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: cocoapods-core
@@ -19,14 +19,14 @@ dependencies:
19
19
  requirements:
20
20
  - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 0.39.0.beta.5
22
+ version: 0.39.0.rc.1
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 0.39.0.beta.5
29
+ version: 0.39.0.rc.1
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: claide
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -47,14 +47,14 @@ dependencies:
47
47
  requirements:
48
48
  - - ~>
49
49
  - !ruby/object:Gem::Version
50
- version: 0.28.0
50
+ version: 0.28.1
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - ~>
56
56
  - !ruby/object:Gem::Version
57
- version: 0.28.0
57
+ version: 0.28.1
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: cocoapods-downloader
60
60
  requirement: !ruby/object:Gem::Requirement
@@ -103,14 +103,14 @@ dependencies:
103
103
  requirements:
104
104
  - - ~>
105
105
  - !ruby/object:Gem::Version
106
- version: 0.6.1
106
+ version: 0.6.2
107
107
  type: :runtime
108
108
  prerelease: false
109
109
  version_requirements: !ruby/object:Gem::Requirement
110
110
  requirements:
111
111
  - - ~>
112
112
  - !ruby/object:Gem::Version
113
- version: 0.6.1
113
+ version: 0.6.2
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: cocoapods-try
116
116
  requirement: !ruby/object:Gem::Requirement
@@ -145,14 +145,14 @@ dependencies:
145
145
  requirements:
146
146
  - - ~>
147
147
  - !ruby/object:Gem::Version
148
- version: 0.3.1
148
+ version: 0.4.0
149
149
  type: :runtime
150
150
  prerelease: false
151
151
  version_requirements: !ruby/object:Gem::Requirement
152
152
  requirements:
153
153
  - - ~>
154
154
  - !ruby/object:Gem::Version
155
- version: 0.3.1
155
+ version: 0.4.0
156
156
  - !ruby/object:Gem::Dependency
157
157
  name: colored
158
158
  requirement: !ruby/object:Gem::Requirement