cocoapods-generate 2.2.3 → 2.2.5
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/VERSION +1 -1
- data/lib/cocoapods/generate/configuration.rb +6 -0
- data/lib/cocoapods/generate/installer.rb +6 -4
- data/lib/cocoapods/generate/podfile_generator.rb +24 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08f2297098adcd3db0c24d515ba15c1591fb39cc243ae6034d909caf43ba3419'
|
4
|
+
data.tar.gz: 3b6311b4cce77ab5f4c7d69fe2c883025997b036309c530d94d371fe92a38d37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6994f22f83a606146190ef561c30f4f94aa152cdfb551daf7d7c22345cc5bfec75273e742a89e8cf71c020031428bc73b3749ff5fcdc1f0b9defb9fadabd5ce8
|
7
|
+
data.tar.gz: 87e10686c0f4c8f9f1c06a8ef17bf3b3fc39237970e85847c31f8a7a7937dd243767788d6af607edf7625dce028507289b79953670fe75349a7a4247425e40d1
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.5
|
@@ -210,6 +210,12 @@ module Pod
|
|
210
210
|
option :use_modular_headers, BOOLEAN, 'false', 'Whether the target should be generated as a clang module, treating dependencies as modules, as if `use_modular_headers!` were specified. Will error if both this option and a podfile are specified', nil, nil, coerce_to_bool
|
211
211
|
option :single_workspace, BOOLEAN, 'false', 'Whether to produce a single workspace for all podspecs specified.', nil, nil, coerce_to_bool
|
212
212
|
option :xcode_version, Pod::Version, 'Pod::Version.new(\'9.3\')', 'The Xcode version to use for producing the consumer sample project', 'xcode_version', nil, coerce_to_version
|
213
|
+
option :external_source_pods, ArrayOf.new(HashOf.new(keys: [String], values: [ArrayOf.new(HashOf.new(keys: [String], values: [String]))])),
|
214
|
+
[],
|
215
|
+
nil,
|
216
|
+
nil,
|
217
|
+
nil,
|
218
|
+
->(external_sources) { Array(external_sources) }
|
213
219
|
|
214
220
|
options.freeze
|
215
221
|
options.each do |o|
|
@@ -7,6 +7,8 @@ module Pod
|
|
7
7
|
DEFAULT_XCODE_VERSION = '9.3'.freeze
|
8
8
|
|
9
9
|
XCODE_VERSION_TO_OBJECT_VERSION = {
|
10
|
+
'14.0' => 56,
|
11
|
+
'13.0' => 55,
|
10
12
|
'12.0' => 54,
|
11
13
|
'11.4' => 53,
|
12
14
|
'11.0' => 52,
|
@@ -185,7 +187,7 @@ module Pod
|
|
185
187
|
native_app_target.resources_build_phase.clear
|
186
188
|
|
187
189
|
if (app_host_source_dir = configuration.app_host_source_dir)
|
188
|
-
relative_app_host_source_dir = app_host_source_dir.relative_path_from(
|
190
|
+
relative_app_host_source_dir = app_host_source_dir.relative_path_from(install_directory)
|
189
191
|
groups = {}
|
190
192
|
|
191
193
|
app_host_source_dir.find do |file|
|
@@ -395,12 +397,12 @@ module Pod
|
|
395
397
|
native_app_target.resources_build_phase.add_file_reference(launch_storyboard_file_ref)
|
396
398
|
end
|
397
399
|
|
398
|
-
def generate_infoplist_file(
|
400
|
+
def generate_infoplist_file(_app_project, native_app_target)
|
399
401
|
# Starting in Xcode 14, there is an error when you build the macOS or
|
400
402
|
# tvOS app that is generated from cocoapods-generate. This implements
|
401
403
|
# the suggested change.
|
402
404
|
native_app_target.build_configurations.each do |bc|
|
403
|
-
bc.build_settings['GENERATE_INFOPLIST_FILE'] =
|
405
|
+
bc.build_settings['GENERATE_INFOPLIST_FILE'] = 'YES'
|
404
406
|
end
|
405
407
|
end
|
406
408
|
|
@@ -442,7 +444,7 @@ module Pod
|
|
442
444
|
source_file.open('w') do |f|
|
443
445
|
f << import_statements.join("\n")
|
444
446
|
f << "\n" unless import_statements.empty?
|
445
|
-
f << "int main() { return 0; }\n"
|
447
|
+
f << "int main(void) { return 0; }\n"
|
446
448
|
end
|
447
449
|
|
448
450
|
source_file
|
@@ -31,6 +31,7 @@ module Pod
|
|
31
31
|
generator = self
|
32
32
|
dir = configuration.gen_dir_for_specs(specs)
|
33
33
|
project_name = configuration.project_name_for_specs(specs)
|
34
|
+
external_source_pods = configuration.external_source_pods
|
34
35
|
|
35
36
|
Pod::Podfile.new do
|
36
37
|
project "#{project_name}.xcodeproj"
|
@@ -93,9 +94,19 @@ module Pod
|
|
93
94
|
.reject { |d| spec_names.include?(d.root_name) }
|
94
95
|
|
95
96
|
dependencies.each do |dependency|
|
96
|
-
pod_args = generator.
|
97
|
+
pod_args = generator.pod_args_for_podfile_dependency(self, dependency)
|
97
98
|
pod(*pod_args)
|
98
99
|
end
|
100
|
+
|
101
|
+
external_source_pods.each do |hash|
|
102
|
+
hash.each do |name, attrs|
|
103
|
+
next if spec_names.include?(name)
|
104
|
+
|
105
|
+
dependency = Dependency.new(name, attrs.first.deep_symbolize_keys)
|
106
|
+
pod_args = generator.pod_args_for_dependency(nil, dependency)
|
107
|
+
pod(*pod_args)
|
108
|
+
end
|
109
|
+
end
|
99
110
|
end
|
100
111
|
|
101
112
|
# Add platform-specific concrete targets that inherit the `pod` declaration for the local pod.
|
@@ -291,12 +302,23 @@ module Pod
|
|
291
302
|
#
|
292
303
|
# @param [Dependency] dependency
|
293
304
|
#
|
294
|
-
def
|
305
|
+
def pod_args_for_podfile_dependency(podfile, dependency)
|
295
306
|
dependency = podfile_dependencies[dependency.root_name]
|
296
307
|
.map { |dep| dep.dup.tap { |d| d.name = dependency.name } }
|
297
308
|
.push(dependency)
|
298
309
|
.reduce(&:merge)
|
310
|
+
pod_args_for_dependency(podfile, dependency)
|
311
|
+
end
|
299
312
|
|
313
|
+
# @return [Hash<String,Array<Dependency>>]
|
314
|
+
# returns the arguments that should be passed to the Podfile DSL's
|
315
|
+
# `pod` method.
|
316
|
+
#
|
317
|
+
# @param [Podfile] podfile
|
318
|
+
#
|
319
|
+
# @param [Dependency] dependency
|
320
|
+
#
|
321
|
+
def pod_args_for_dependency(podfile, dependency)
|
300
322
|
options = dependency_compilation_kwargs(dependency.name)
|
301
323
|
options[:source] = dependency.podspec_repo if dependency.podspec_repo
|
302
324
|
options.update(dependency.external_source) if dependency.external_source
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-generate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Giddins
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods-disable-podfile-validations
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
|
-
rubygems_version: 3.
|
110
|
+
rubygems_version: 3.4.10
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: Generates Xcode workspaces from a podspec.
|