cocoapods-generate 1.3.1 → 1.4.0
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 +3 -0
- data/lib/cocoapods/generate/installer.rb +7 -1
- data/lib/cocoapods/generate/podfile_generator.rb +35 -5
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 067262b8308a92713c42f4ddbce02e2ccd49706d6c63fb362579b4940304787b
|
|
4
|
+
data.tar.gz: 3a3b21887162068fd52413481196ade377203cab85b6529577858fb3d6bae541
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b12fabd58e79a33e9ecb3c997e2f26abacc8b049faf23e52a81121f46391355ffbbe247f488db7e326768be85510a4170bfed08498d0bb975579eff5a2e081fb
|
|
7
|
+
data.tar.gz: d908644512ac74a4e0748113ab7ed34459f4a7a0a3d9b45acc4abc4d7898740280a24e0981bc19d0583999d5081265b411cfc13b23b43eae94405aebd2a789cb
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.4.0
|
|
@@ -149,6 +149,9 @@ module Pod
|
|
|
149
149
|
|
|
150
150
|
option :use_libraries, BOOLEAN, 'false', 'Whether to use libraries instead of frameworks', nil, nil, coerce_to_bool
|
|
151
151
|
|
|
152
|
+
option :generate_multiple_pod_projects, BOOLEAN, 'false', 'Whether to generate multiple Xcode projects', nil, nil, coerce_to_bool
|
|
153
|
+
option :incremental_installation, BOOLEAN, 'false', 'Whether to use incremental installation', nil, nil, coerce_to_bool
|
|
154
|
+
|
|
152
155
|
option :gen_directory, [String, Pathname], 'Pathname("gen").expand_path', 'Path to generate workspaces in', 'PATH', ->(path) { 'path is file' if path.file? }, coerce_to_pathname
|
|
153
156
|
option :auto_open, BOOLEAN, 'false', 'Whether to automatically open the generated workspaces', nil, nil, coerce_to_bool
|
|
154
157
|
option :clean, BOOLEAN, 'false', 'Whether to clean the generated directories before generating', nil, nil, coerce_to_bool
|
|
@@ -192,7 +192,13 @@ module Pod
|
|
|
192
192
|
end
|
|
193
193
|
|
|
194
194
|
# Share the pods xcscheme only if it exists. For pre-built vendored pods there is no xcscheme generated.
|
|
195
|
-
|
|
195
|
+
if installer.respond_to?(:generated_projects) # CocoaPods 1.7.0
|
|
196
|
+
installer.generated_projects.each do |project|
|
|
197
|
+
Xcodeproj::XCScheme.share_scheme(project.path, pod_target.label) if File.exist?(project.path + pod_target.label)
|
|
198
|
+
end
|
|
199
|
+
elsif File.exist?(installer.pods_project.path + pod_target.label)
|
|
200
|
+
Xcodeproj::XCScheme.share_scheme(installer.pods_project.path, pod_target.label)
|
|
201
|
+
end
|
|
196
202
|
|
|
197
203
|
add_test_spec_schemes_to_app_scheme(installer, app_project)
|
|
198
204
|
end
|
|
@@ -37,10 +37,7 @@ module Pod
|
|
|
37
37
|
|
|
38
38
|
plugin 'cocoapods-generate'
|
|
39
39
|
|
|
40
|
-
install! 'cocoapods',
|
|
41
|
-
deterministic_uuids: generator.configuration.deterministic_uuids?,
|
|
42
|
-
share_schemes_for_development_pods: generator.configuration.share_schemes_for_development_pods?,
|
|
43
|
-
warn_for_multiple_pod_sources: generator.configuration.warn_for_multiple_pod_sources?
|
|
40
|
+
install! 'cocoapods', generator.installation_options
|
|
44
41
|
|
|
45
42
|
generator.configuration.podfile_plugins.each do |name, options|
|
|
46
43
|
plugin(*[name, options].compact)
|
|
@@ -48,6 +45,10 @@ module Pod
|
|
|
48
45
|
|
|
49
46
|
use_frameworks!(generator.configuration.use_frameworks?)
|
|
50
47
|
|
|
48
|
+
if (supported_swift_versions = generator.supported_swift_versions)
|
|
49
|
+
supports_swift_versions(supported_swift_versions)
|
|
50
|
+
end
|
|
51
|
+
|
|
51
52
|
# Explicitly set sources
|
|
52
53
|
generator.configuration.sources.each do |source_url|
|
|
53
54
|
source(source_url)
|
|
@@ -96,7 +97,7 @@ module Pod
|
|
|
96
97
|
end
|
|
97
98
|
end
|
|
98
99
|
|
|
99
|
-
# this block
|
|
100
|
+
# this block has to come _before_ inhibit_all_warnings! / use_modular_headers!,
|
|
100
101
|
# and the local `pod` declaration
|
|
101
102
|
current_target_definition.instance_exec do
|
|
102
103
|
transitive_dependencies = children.find { |c| c.name == 'Transitive Dependencies' }
|
|
@@ -246,6 +247,35 @@ module Pod
|
|
|
246
247
|
@swift_version ||= target_definition_list.map(&:swift_version).compact.max
|
|
247
248
|
end
|
|
248
249
|
|
|
250
|
+
def supported_swift_versions
|
|
251
|
+
return unless configuration.use_podfile?
|
|
252
|
+
return if target_definition_list.empty?
|
|
253
|
+
return unless target_definition_list.first.respond_to?(:swift_version_requirements)
|
|
254
|
+
target_definition_list.reduce(nil) do |supported_swift_versions, target_definition|
|
|
255
|
+
target_swift_versions = target_definition.swift_version_requirements
|
|
256
|
+
next supported_swift_versions unless target_swift_versions
|
|
257
|
+
Array(target_swift_versions) | Array(supported_swift_versions)
|
|
258
|
+
end
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
def installation_options
|
|
262
|
+
installation_options = {
|
|
263
|
+
deterministic_uuids: configuration.deterministic_uuids?,
|
|
264
|
+
share_schemes_for_development_pods: configuration.share_schemes_for_development_pods?,
|
|
265
|
+
warn_for_multiple_pod_sources: configuration.warn_for_multiple_pod_sources?
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if Pod::Installer::InstallationOptions.all_options.include?('generate_multiple_pod_projects')
|
|
269
|
+
installation_options[:generate_multiple_pod_projects] = configuration.generate_multiple_pod_projects?
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
if Pod::Installer::InstallationOptions.all_options.include?('incremental_installation')
|
|
273
|
+
installation_options[:incremental_installation] = configuration.incremental_installation?
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
installation_options
|
|
277
|
+
end
|
|
278
|
+
|
|
249
279
|
private
|
|
250
280
|
|
|
251
281
|
# @return [Array<Podfile::TargetDefinition>]
|
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: 1.
|
|
4
|
+
version: 1.4.0
|
|
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: 2019-03-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -85,8 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
85
85
|
- !ruby/object:Gem::Version
|
|
86
86
|
version: '0'
|
|
87
87
|
requirements: []
|
|
88
|
-
|
|
89
|
-
rubygems_version: 2.7.7
|
|
88
|
+
rubygems_version: 3.0.2
|
|
90
89
|
signing_key:
|
|
91
90
|
specification_version: 4
|
|
92
91
|
summary: Generates Xcode workspaces from a podspec.
|