cocoapods-generate 1.5.0 → 1.6.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/README.md +3 -0
- data/VERSION +1 -1
- data/lib/cocoapods/generate/configuration.rb +9 -0
- data/lib/cocoapods/generate/installer.rb +25 -19
- data/lib/cocoapods/generate/podfile_generator.rb +6 -1
- 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: 444c04f0d19618e1220c68828b385d2a5360b63f359f6d5c97840c92ec4c82f5
|
4
|
+
data.tar.gz: 953c104741ea87c0629466cd2db8e6b27f2a9d3b395b7a18b76b714fec8d926c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdf382c8e04699dfb9c206fdc97fb892d39fd7b3d5403fa2118127c2caf92330bd7445b49bc38542ce67aae075002c412633ba09600a3682e20a797ae6d2bae5
|
7
|
+
data.tar.gz: 237a7ab95303b502f3f0e8b525a3c6f4f640031d55b5ceab88a963806b762f51b15c7197a23c779cae4fd39e54aecb5c47e9daa0a2e0f93b03f84fbaa26c05c7
|
data/README.md
CHANGED
@@ -79,6 +79,9 @@ Options:
|
|
79
79
|
--local-sources=SOURCE1,SOURCE2 Paths from which to find local podspecs for
|
80
80
|
transitive dependencies. Multiple
|
81
81
|
local-sources must be comma-delimited.
|
82
|
+
--platforms=ios,macos Limit to specific platforms. Default is all
|
83
|
+
platforms supported by the podspec.
|
84
|
+
Multiple platforms must be comma-delimited.
|
82
85
|
--repo-update Force running `pod repo update` before
|
83
86
|
install
|
84
87
|
--use-default-plugins Whether installation should activate
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.6.0
|
@@ -188,6 +188,15 @@ module Pod
|
|
188
188
|
'SOURCE1,SOURCE2',
|
189
189
|
->(_) { nil },
|
190
190
|
->(local_sources) { Array(local_sources).flat_map { |s| s.split(',') } }
|
191
|
+
option :platforms, ArrayOf.new(String),
|
192
|
+
nil,
|
193
|
+
'Limit to specific platforms. Default is all platforms supported by the podspec. Multiple platforms must be comma-delimited.',
|
194
|
+
'ios,macos',
|
195
|
+
lambda { |platforms|
|
196
|
+
valid_platforms = Platform.all.map { |p| p.string_name.downcase }
|
197
|
+
valid_platforms unless (platforms - valid_platforms).empty?
|
198
|
+
}, # validates platforms is a subset of Platform.all
|
199
|
+
->(platforms) { Array(platforms).flat_map { |s| s.split(',') } }
|
191
200
|
option :repo_update, BOOLEAN, 'false', 'Force running `pod repo update` before install', nil, nil, coerce_to_bool
|
192
201
|
option :use_default_plugins, BOOLEAN, 'false', 'Whether installation should activate default plugins', nil, nil, coerce_to_bool
|
193
202
|
option :deterministic_uuids, BOOLEAN, 'false', 'Whether installation should use deterministic UUIDs for pods projects', nil, nil, coerce_to_bool
|
@@ -94,28 +94,34 @@ module Pod
|
|
94
94
|
def create_app_project
|
95
95
|
app_project = open_app_project(recreate: true)
|
96
96
|
|
97
|
-
spec.available_platforms.
|
98
|
-
|
99
|
-
target_name = "App-#{Platform.string_name(consumer.platform_name)}"
|
100
|
-
native_app_target = Pod::Generator::AppTargetHelper.add_app_target(app_project, consumer.platform_name, deployment_target(consumer), target_name)
|
101
|
-
# Temporarily set Swift version to pass validator checks for pods which do not specify Swift version.
|
102
|
-
# It will then be re-set again within #perform_post_install_steps.
|
103
|
-
Pod::Generator::AppTargetHelper.add_swift_version(native_app_target, Pod::Validator::DEFAULT_SWIFT_VERSION)
|
104
|
-
native_app_target
|
97
|
+
spec_platforms = spec.available_platforms.flatten.reject do |platform|
|
98
|
+
!configuration.platforms.nil? && !configuration.platforms.include?(platform.string_name.downcase)
|
105
99
|
end
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
100
|
+
|
101
|
+
Pod::Command::Gen.help! Pod::StandardError.new "No available platforms in #{spec.name}.podspec match requested platforms: #{configuration.platforms}" if spec_platforms.empty?
|
102
|
+
|
103
|
+
spec_platforms
|
104
|
+
.map do |platform|
|
105
|
+
consumer = spec.consumer(platform)
|
106
|
+
target_name = "App-#{Platform.string_name(consumer.platform_name)}"
|
107
|
+
native_app_target = Pod::Generator::AppTargetHelper.add_app_target(app_project, consumer.platform_name, deployment_target(consumer), target_name)
|
108
|
+
# Temporarily set Swift version to pass validator checks for pods which do not specify Swift version.
|
109
|
+
# It will then be re-set again within #perform_post_install_steps.
|
110
|
+
Pod::Generator::AppTargetHelper.add_swift_version(native_app_target, Pod::Validator::DEFAULT_SWIFT_VERSION)
|
111
|
+
native_app_target
|
112
|
+
end
|
113
|
+
.tap do
|
114
|
+
app_project.recreate_user_schemes do |scheme, target|
|
115
|
+
installation_result = installation_result_from_target(target)
|
116
|
+
next unless installation_result
|
117
|
+
installation_result.test_native_targets.each do |test_native_target|
|
118
|
+
scheme.add_test_target(test_native_target)
|
113
119
|
end
|
114
120
|
end
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
121
|
+
end
|
122
|
+
.each do |target|
|
123
|
+
Xcodeproj::XCScheme.share_scheme(app_project.path, target.name) if target
|
124
|
+
end
|
119
125
|
app_project.save
|
120
126
|
end
|
121
127
|
|
@@ -91,7 +91,11 @@ module Pod
|
|
91
91
|
|
92
92
|
# Add platform-specific concrete targets that inherit the
|
93
93
|
# `pod` declaration for the local pod.
|
94
|
-
spec.available_platforms.map(&:string_name).
|
94
|
+
spec_platform_names = spec.available_platforms.map(&:string_name).flatten.each.reject do |platform_name|
|
95
|
+
!generator.configuration.platforms.nil? && !generator.configuration.platforms.include?(platform_name.downcase)
|
96
|
+
end
|
97
|
+
|
98
|
+
spec_platform_names.sort.each do |platform_name|
|
95
99
|
target "App-#{platform_name}" do
|
96
100
|
current_target_definition.swift_version = generator.swift_version if generator.swift_version
|
97
101
|
end
|
@@ -349,6 +353,7 @@ module Pod
|
|
349
353
|
#
|
350
354
|
def modular_headers?(pod_name)
|
351
355
|
return true if configuration.use_modular_headers?
|
356
|
+
return false unless configuration.use_podfile?
|
352
357
|
target_definitions_for_pod(pod_name).all? do |target_definition|
|
353
358
|
target_definition.build_pod_as_module?(pod_name)
|
354
359
|
end
|
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.6.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: 2019-
|
11
|
+
date: 2019-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods-disable-podfile-validations
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
103
|
requirements: []
|
104
|
-
rubygems_version: 3.0.
|
104
|
+
rubygems_version: 3.0.4
|
105
105
|
signing_key:
|
106
106
|
specification_version: 4
|
107
107
|
summary: Generates Xcode workspaces from a podspec.
|