cocoapods 1.11.0.beta.1 → 1.11.0.beta.2
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 +4 -4
- data/CHANGELOG.md +15 -0
- data/lib/cocoapods/gem_version.rb +1 -1
- data/lib/cocoapods/generator/copy_xcframework_script.rb +1 -1
- data/lib/cocoapods/installer/project_cache/target_cache_key.rb +5 -2
- data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +59 -20
- data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb +6 -6
- data/lib/cocoapods/sandbox/file_accessor.rb +11 -5
- data/lib/cocoapods/target/aggregate_target.rb +1 -1
- data/lib/cocoapods/target/pod_target.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb329667c5428edaa84a9f21d4545285f7946264581b884c1d1f6387fd0cb570
|
4
|
+
data.tar.gz: 2d0887f1665eda88c26ba2e2350b58623f381123e0487da7f120854cfbd053dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 821686e3f37164465545f59f337f90e28bee70c4002dab29ee85a072bff82ee1c3e57cf580638ac6b8f20d628f209940818a8adc2c397fd221bdaeac67a3f4d1
|
7
|
+
data.tar.gz: e39c20a0f708ec54aa4bc0f92610e7dda998628ae660e6a09d5c1bed072ecde3b5a8a5a696191083d62136b00fc11c42cb85c99b7aadb2811a314a70fcca4753
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,21 @@ To install or update CocoaPods see this [guide](https://guides.cocoapods.org/usi
|
|
4
4
|
|
5
5
|
To install release candidates run `[sudo] gem install cocoapods --pre`
|
6
6
|
|
7
|
+
## 1.11.0.beta.2 (2021-08-11)
|
8
|
+
|
9
|
+
##### Enhancements
|
10
|
+
|
11
|
+
* Integrate ODR categories into projects.
|
12
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
13
|
+
[#10855](https://github.com/CocoaPods/CocoaPods/pull/10855)
|
14
|
+
|
15
|
+
##### Bug Fixes
|
16
|
+
|
17
|
+
* Pass correct paths for `select_slice` method.
|
18
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
19
|
+
[#10430](https://github.com/CocoaPods/CocoaPods/issues/10430)
|
20
|
+
|
21
|
+
|
7
22
|
## 1.11.0.beta.1 (2021-08-09)
|
8
23
|
|
9
24
|
##### Enhancements
|
@@ -161,7 +161,7 @@ install_xcframework() {
|
|
161
161
|
local basepath="$1"
|
162
162
|
local name="$2"
|
163
163
|
local package_type="$3"
|
164
|
-
local paths=("
|
164
|
+
local paths=("${@:3}")
|
165
165
|
|
166
166
|
# Locate the correct slice of the .xcframework for the current architectures
|
167
167
|
select_slice "${paths[@]}"
|
@@ -162,8 +162,11 @@ module Pod
|
|
162
162
|
'BUILD_SETTINGS_CHECKSUM' => build_settings,
|
163
163
|
}
|
164
164
|
if aggregate_target.includes_resources? || aggregate_target.includes_on_demand_resources?
|
165
|
-
|
166
|
-
|
165
|
+
relative_resource_file_paths = aggregate_target.resource_paths_by_config.values.flatten.uniq
|
166
|
+
relative_on_demand_resource_file_paths = aggregate_target.on_demand_resources.map do |res|
|
167
|
+
res.relative_path_from(sandbox.project_path.dirname).to_s
|
168
|
+
end
|
169
|
+
contents['FILES'] = (relative_resource_file_paths + relative_on_demand_resource_file_paths).sort_by(&:downcase)
|
167
170
|
end
|
168
171
|
TargetCacheKey.new(sandbox, :aggregate, contents)
|
169
172
|
end
|
@@ -32,7 +32,8 @@ module Pod
|
|
32
32
|
# For messages extensions, this only applies if it's embedded in a messages
|
33
33
|
# application.
|
34
34
|
#
|
35
|
-
EMBED_FRAMEWORK_TARGET_TYPES = [:application, :application_on_demand_install_capable, :unit_test_bundle,
|
35
|
+
EMBED_FRAMEWORK_TARGET_TYPES = [:application, :application_on_demand_install_capable, :unit_test_bundle,
|
36
|
+
:ui_test_bundle, :watch2_extension, :messages_application].freeze
|
36
37
|
|
37
38
|
# @return [String] the name of the embed frameworks phase
|
38
39
|
#
|
@@ -457,9 +458,9 @@ module Pod
|
|
457
458
|
#
|
458
459
|
# @return [void]
|
459
460
|
#
|
460
|
-
def
|
461
|
-
|
462
|
-
|
461
|
+
def update_on_demand_resources(sandbox, project, native_targets, file_accessors, parent_odr_group,
|
462
|
+
target_odr_group_name)
|
463
|
+
category_to_tags = {}
|
463
464
|
file_accessors = Array(file_accessors)
|
464
465
|
native_targets = Array(native_targets)
|
465
466
|
|
@@ -469,8 +470,9 @@ module Pod
|
|
469
470
|
old_odr_file_refs = old_target_odr_group&.recursive_children_groups&.each_with_object({}) do |group, hash|
|
470
471
|
hash[group.name] = group.files
|
471
472
|
end || {}
|
472
|
-
native_targets.each do |
|
473
|
-
|
473
|
+
native_targets.each do |native_target|
|
474
|
+
native_target.remove_on_demand_resources(old_odr_file_refs)
|
475
|
+
update_on_demand_resources_build_settings(native_target, nil => old_odr_file_refs.keys)
|
474
476
|
end
|
475
477
|
old_target_odr_group&.remove_from_project
|
476
478
|
return
|
@@ -480,17 +482,18 @@ module Pod
|
|
480
482
|
current_file_refs = target_odr_group.recursive_children_groups.flat_map(&:files)
|
481
483
|
|
482
484
|
added_file_refs = file_accessors.flat_map do |file_accessor|
|
483
|
-
target_odr_files_refs = Hash[file_accessor.on_demand_resources.map do |tag,
|
485
|
+
target_odr_files_refs = Hash[file_accessor.on_demand_resources.map do |tag, value|
|
484
486
|
tag_group = target_odr_group[tag] || target_odr_group.new_group(tag)
|
485
|
-
|
486
|
-
|
487
|
+
category_to_tags[value[:category]] ||= []
|
488
|
+
category_to_tags[value[:category]] << tag
|
489
|
+
resources_file_refs = value[:paths].map do |resource|
|
487
490
|
odr_resource_file_ref = Pathname.new(resource).relative_path_from(sandbox.root)
|
488
491
|
tag_group.find_file_by_path(odr_resource_file_ref.to_s) || tag_group.new_file(odr_resource_file_ref)
|
489
492
|
end
|
490
493
|
[tag, resources_file_refs]
|
491
494
|
end]
|
492
|
-
native_targets.each do |
|
493
|
-
|
495
|
+
native_targets.each do |native_target|
|
496
|
+
native_target.add_on_demand_resources(target_odr_files_refs)
|
494
497
|
end
|
495
498
|
target_odr_files_refs.values.flatten
|
496
499
|
end
|
@@ -506,10 +509,42 @@ module Pod
|
|
506
509
|
end
|
507
510
|
target_odr_group.recursive_children_groups.each { |g| g.remove_from_project if g.empty? }
|
508
511
|
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
512
|
+
attributes = project.root_object.attributes
|
513
|
+
attributes['KnownAssetTags'] = (attributes['KnownAssetTags'] ||= []) | category_to_tags.values.flatten
|
514
|
+
project.root_object.attributes = attributes
|
515
|
+
|
516
|
+
native_targets.each do |native_target|
|
517
|
+
update_on_demand_resources_build_settings(native_target, category_to_tags)
|
518
|
+
end
|
519
|
+
end
|
520
|
+
|
521
|
+
def update_on_demand_resources_build_settings(native_target, category_to_tags)
|
522
|
+
%w[ON_DEMAND_RESOURCES_INITIAL_INSTALL_TAGS ON_DEMAND_RESOURCES_PREFETCH_ORDER].each do |category_key|
|
523
|
+
native_target.build_configurations.each do |c|
|
524
|
+
key = case category_key
|
525
|
+
when 'ON_DEMAND_RESOURCES_INITIAL_INSTALL_TAGS'
|
526
|
+
:initial_install
|
527
|
+
when 'ON_DEMAND_RESOURCES_PREFETCH_ORDER'
|
528
|
+
:prefetched
|
529
|
+
else
|
530
|
+
:download_on_demand
|
531
|
+
end
|
532
|
+
tags_for_category = (c.build_settings[category_key] || '').split
|
533
|
+
category_to_tags_dup = category_to_tags.dup
|
534
|
+
tags_to_add = category_to_tags_dup.delete(key) || []
|
535
|
+
tags_to_delete = category_to_tags_dup.values.flatten
|
536
|
+
tags_for_category = (tags_for_category + tags_to_add - tags_to_delete).flatten.compact.uniq
|
537
|
+
if tags_for_category.empty?
|
538
|
+
val = c.build_settings.delete(category_key)
|
539
|
+
native_target.project.mark_dirty! unless val.nil?
|
540
|
+
else
|
541
|
+
tags = tags_for_category.join(' ')
|
542
|
+
unless c.build_settings[category_key] == tags
|
543
|
+
c.build_settings[category_key] = tags
|
544
|
+
native_target.project.mark_dirty!
|
545
|
+
end
|
546
|
+
end
|
547
|
+
end
|
513
548
|
end
|
514
549
|
end
|
515
550
|
end
|
@@ -596,10 +631,12 @@ module Pod
|
|
596
631
|
output_paths_by_config = {}
|
597
632
|
if use_input_output_paths
|
598
633
|
target.resource_paths_by_config.each do |config, resource_paths|
|
599
|
-
input_paths_key = XCFileListConfigKey.new(target.copy_resources_script_input_files_path(config),
|
634
|
+
input_paths_key = XCFileListConfigKey.new(target.copy_resources_script_input_files_path(config),
|
635
|
+
target.copy_resources_script_input_files_relative_path)
|
600
636
|
input_paths_by_config[input_paths_key] = [script_path] + resource_paths
|
601
637
|
|
602
|
-
output_paths_key = XCFileListConfigKey.new(target.copy_resources_script_output_files_path(config),
|
638
|
+
output_paths_key = XCFileListConfigKey.new(target.copy_resources_script_output_files_path(config),
|
639
|
+
target.copy_resources_script_output_files_relative_path)
|
603
640
|
output_paths_by_config[output_paths_key] = TargetIntegrator.resource_output_paths(resource_paths)
|
604
641
|
end
|
605
642
|
end
|
@@ -607,7 +644,9 @@ module Pod
|
|
607
644
|
native_targets.each do |native_target|
|
608
645
|
# Static library targets cannot include resources. Skip this phase from being added instead.
|
609
646
|
next if native_target.symbol_type == :static_library
|
610
|
-
TargetIntegrator.create_or_update_copy_resources_script_phase_to_target(native_target, script_path,
|
647
|
+
TargetIntegrator.create_or_update_copy_resources_script_phase_to_target(native_target, script_path,
|
648
|
+
input_paths_by_config,
|
649
|
+
output_paths_by_config)
|
611
650
|
end
|
612
651
|
end
|
613
652
|
|
@@ -720,8 +759,8 @@ module Pod
|
|
720
759
|
# The 'Pods' group would always be there for production code however for tests its sometimes not added.
|
721
760
|
# This ensures its always present and makes it easier for existing and new tests.
|
722
761
|
parent_odr_group = target.user_project.main_group['Pods'] || target.user_project.new_group('Pods')
|
723
|
-
TargetIntegrator.
|
724
|
-
|
762
|
+
TargetIntegrator.update_on_demand_resources(target.sandbox, target.user_project, target.user_targets,
|
763
|
+
library_file_accessors, parent_odr_group, target_odr_group_name)
|
725
764
|
end
|
726
765
|
end
|
727
766
|
|
@@ -271,17 +271,17 @@ module Pod
|
|
271
271
|
fa.spec.test_specification? && pod_target.test_app_hosts_by_spec[fa.spec]&.first == app_spec
|
272
272
|
end
|
273
273
|
target_odr_group_name = "#{pod_target.label}-OnDemandResources"
|
274
|
-
UserProjectIntegrator::TargetIntegrator.
|
275
|
-
|
276
|
-
|
274
|
+
UserProjectIntegrator::TargetIntegrator.update_on_demand_resources(target.sandbox, native_target.project,
|
275
|
+
native_target, file_accessors,
|
276
|
+
parent_odr_group, target_odr_group_name)
|
277
277
|
end
|
278
278
|
|
279
279
|
# Now add the ODRs of our own app spec declaration.
|
280
280
|
file_accessor = target.file_accessors.find { |fa| fa.spec == app_spec }
|
281
281
|
target_odr_group_name = "#{target.subspec_label(app_spec)}-OnDemandResources"
|
282
|
-
UserProjectIntegrator::TargetIntegrator.
|
283
|
-
|
284
|
-
|
282
|
+
UserProjectIntegrator::TargetIntegrator.update_on_demand_resources(target.sandbox, native_target.project,
|
283
|
+
native_target, file_accessor,
|
284
|
+
parent_odr_group, target_odr_group_name)
|
285
285
|
end
|
286
286
|
|
287
287
|
# @return [String] the message that should be displayed for the target
|
@@ -219,7 +219,7 @@ module Pod
|
|
219
219
|
file_accessors.map(&:preserve_paths),
|
220
220
|
file_accessors.map(&:readme),
|
221
221
|
file_accessors.map(&:resources),
|
222
|
-
file_accessors.
|
222
|
+
file_accessors.map(&:on_demand_resources_files),
|
223
223
|
file_accessors.map(&:source_files),
|
224
224
|
file_accessors.map(&:module_map),
|
225
225
|
]
|
@@ -334,20 +334,26 @@ module Pod
|
|
334
334
|
resource_bundles.values.flatten
|
335
335
|
end
|
336
336
|
|
337
|
-
# @return [Hash{String =>
|
338
|
-
# keyed by their tag.
|
337
|
+
# @return [Hash{String => Hash] The expanded paths of the on demand resources specified
|
338
|
+
# keyed by their tag including their category.
|
339
339
|
#
|
340
340
|
def on_demand_resources
|
341
341
|
result = {}
|
342
342
|
spec_consumer.on_demand_resources.each do |tag_name, file_patterns|
|
343
|
-
paths = expanded_paths(file_patterns,
|
343
|
+
paths = expanded_paths(file_patterns[:paths],
|
344
344
|
:exclude_patterns => spec_consumer.exclude_files,
|
345
345
|
:include_dirs => true)
|
346
|
-
result[tag_name] = paths
|
346
|
+
result[tag_name] = { :paths => paths, :category => file_patterns[:category] }
|
347
347
|
end
|
348
348
|
result
|
349
349
|
end
|
350
350
|
|
351
|
+
# @return [Array<Pathname>] The expanded paths of the on demand resources.
|
352
|
+
#
|
353
|
+
def on_demand_resources_files
|
354
|
+
on_demand_resources.values.flat_map { |v| v[:paths] }
|
355
|
+
end
|
356
|
+
|
351
357
|
# @return [Pathname] The of the prefix header file of the specification.
|
352
358
|
#
|
353
359
|
def prefix_header
|
@@ -288,7 +288,7 @@ module Pod
|
|
288
288
|
@on_demand_resources ||= begin
|
289
289
|
pod_targets.flat_map do |pod_target|
|
290
290
|
library_file_accessors = pod_target.file_accessors.select { |fa| fa.spec.library_specification? }
|
291
|
-
library_file_accessors.flat_map
|
291
|
+
library_file_accessors.flat_map(&:on_demand_resources_files)
|
292
292
|
end.uniq
|
293
293
|
end
|
294
294
|
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: 1.11.0.beta.
|
4
|
+
version: 1.11.0.beta.2
|
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: 2021-08-
|
14
|
+
date: 2021-08-12 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: 1.11.0.beta.
|
22
|
+
version: 1.11.0.beta.2
|
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: 1.11.0.beta.
|
29
|
+
version: 1.11.0.beta.2
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: claide
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|