cocoapods-generate 1.4.1 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +9 -0
- data/README.md +6 -1
- data/VERSION +1 -1
- data/lib/cocoapods/generate/configuration.rb +7 -1
- data/lib/cocoapods/generate/installer.rb +9 -13
- data/lib/cocoapods/generate/podfile_generator.rb +42 -2
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52f85405e2e27e0c197fac736a0f1c3d61f47e601238737f6082aa6913512c7c
|
4
|
+
data.tar.gz: 2fe15ee1fd79bd155bf94140fbe0a7bfbd2f318d355c43bac59b743e42da738e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db80754352a3a07467f11099713f58788fd1a342e54c7fd75e975b3bd73f3230980c07f271de56102a696d3e6663b29a1a21ed4efc38f8ca2bc7a5a62c06f600
|
7
|
+
data.tar.gz: 64c521033f329de4ad9d232ce147b33d25b885c70a020175e27e65c3ce639144d2cd27c6f864a08381b0b0d05b25488693b345b62ac641ad1a88483e70eb2fe3
|
data/LICENSE.md
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
6
|
+
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
8
|
+
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -62,6 +62,8 @@ Options:
|
|
62
62
|
be used
|
63
63
|
--use-libraries Whether to use libraries instead of
|
64
64
|
frameworks
|
65
|
+
--generate-multiple-pod-projects Whether to generate multiple Xcode projects
|
66
|
+
--incremental-installation Whether to use incremental installation
|
65
67
|
--gen-directory=PATH Path to generate workspaces in
|
66
68
|
--auto-open Whether to automatically open the generated
|
67
69
|
workspaces
|
@@ -69,11 +71,14 @@ Options:
|
|
69
71
|
before generating
|
70
72
|
--app-host-source-dir=DIR A directory containing sources to use for
|
71
73
|
the app host
|
72
|
-
--sources=SOURCE1,SOURCE2 The sources from which to pull
|
74
|
+
--sources=SOURCE1,SOURCE2 The sources from which to pull dependent
|
73
75
|
pods (defaults to all repos in the podfile
|
74
76
|
if using the podfile, else all available
|
75
77
|
repos). Can be a repo name or URL. Multiple
|
76
78
|
sources must be comma-delimited.
|
79
|
+
--local-sources=SOURCE1,SOURCE2 Paths from which to find local podspecs for
|
80
|
+
transitive dependencies. Multiple
|
81
|
+
local-sources must be comma-delimited.
|
77
82
|
--repo-update Force running `pod repo update` before
|
78
83
|
install
|
79
84
|
--use-default-plugins Whether installation should activate
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.5.0
|
@@ -178,10 +178,16 @@ module Pod
|
|
178
178
|
# installer options
|
179
179
|
option :sources, ArrayOf.new(String),
|
180
180
|
'if use_podfile && podfile then ::Pod::Installer::Analyzer.new(:sandbox, podfile).sources.map(&:url) else pod_config.sources_manager.all.map(&:url) end',
|
181
|
-
'The sources from which to pull
|
181
|
+
'The sources from which to pull dependent pods (defaults to all repos in the podfile if using the podfile, else all available repos). Can be a repo name or URL. Multiple sources must be comma-delimited.',
|
182
182
|
'SOURCE1,SOURCE2',
|
183
183
|
->(_) { nil },
|
184
184
|
->(sources) { Array(sources).flat_map { |s| s.split(',') } }
|
185
|
+
option :local_sources, ArrayOf.new(String),
|
186
|
+
[],
|
187
|
+
'Paths from which to find local podspecs for transitive dependencies. Multiple local-sources must be comma-delimited.',
|
188
|
+
'SOURCE1,SOURCE2',
|
189
|
+
->(_) { nil },
|
190
|
+
->(local_sources) { Array(local_sources).flat_map { |s| s.split(',') } }
|
185
191
|
option :repo_update, BOOLEAN, 'false', 'Force running `pod repo update` before install', nil, nil, coerce_to_bool
|
186
192
|
option :use_default_plugins, BOOLEAN, 'false', 'Whether installation should activate default plugins', nil, nil, coerce_to_bool
|
187
193
|
option :deterministic_uuids, BOOLEAN, 'false', 'Whether installation should use deterministic UUIDs for pods projects', nil, nil, coerce_to_bool
|
@@ -4,18 +4,6 @@ module Pod
|
|
4
4
|
# given a configuration and a generated podfile.
|
5
5
|
#
|
6
6
|
class Installer
|
7
|
-
# A subclass of the CocoaPods installer that vends analyzer classes
|
8
|
-
# that skip validating podfiles
|
9
|
-
#
|
10
|
-
class InstallerNoValidatePodfile < ::Pod::Installer
|
11
|
-
def create_analyzer(*)
|
12
|
-
super.tap do |analyzer|
|
13
|
-
def analyzer.validate_podfile!; end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
private_constant :InstallerNoValidatePodfile
|
18
|
-
|
19
7
|
# @return [Configuration]
|
20
8
|
# the configuration to use when installing
|
21
9
|
#
|
@@ -64,7 +52,7 @@ module Pod
|
|
64
52
|
installer = nil
|
65
53
|
UI.section 'Installing...' do
|
66
54
|
configuration.pod_config.with_changes(installation_root: install_directory, podfile: podfile, lockfile: configuration.lockfile, sandbox: nil, sandbox_root: install_directory, podfile_path: podfile.defined_in_file, silent: !configuration.pod_config.verbose?, verbose: false, lockfile_path: nil) do
|
67
|
-
installer =
|
55
|
+
installer = ::Pod::Installer.new(configuration.pod_config.sandbox, podfile, configuration.lockfile)
|
68
56
|
installer.use_default_plugins = configuration.use_default_plugins
|
69
57
|
installer.install!
|
70
58
|
end
|
@@ -164,6 +152,14 @@ module Pod
|
|
164
152
|
end
|
165
153
|
|
166
154
|
next
|
155
|
+
elsif file.to_s.end_with?('-Bridging-Header.h')
|
156
|
+
native_app_target.build_configurations.each do |bc|
|
157
|
+
if (old_bridging_header = bc.build_settings['SWIFT_OBJC_BRIDGING_HEADER'])
|
158
|
+
raise Informative, "Conflicting Swift ObjC bridging headers specified, got #{old_bridging_header} and #{relative_path}. Only one `-Bridging-Header.h` file may be specified in the app host source dir."
|
159
|
+
end
|
160
|
+
|
161
|
+
bc.build_settings['SWIFT_OBJC_BRIDGING_HEADER'] = relative_path.to_s
|
162
|
+
end
|
167
163
|
end
|
168
164
|
|
169
165
|
group = groups[relative_path.dirname]
|
@@ -39,7 +39,7 @@ module Pod
|
|
39
39
|
|
40
40
|
install! 'cocoapods', generator.installation_options
|
41
41
|
|
42
|
-
generator.
|
42
|
+
generator.podfile_plugins.each do |name, options|
|
43
43
|
plugin(*[name, options].compact)
|
44
44
|
end
|
45
45
|
|
@@ -54,7 +54,7 @@ module Pod
|
|
54
54
|
source(source_url)
|
55
55
|
end
|
56
56
|
|
57
|
-
self.defined_in_file = dir.join('
|
57
|
+
self.defined_in_file = dir.join('CocoaPods.podfile.yaml')
|
58
58
|
|
59
59
|
test_specs = spec.recursive_subspecs.select(&:test_specification?)
|
60
60
|
app_specs = if spec.respond_to?(:app_specification?)
|
@@ -121,7 +121,41 @@ module Pod
|
|
121
121
|
end
|
122
122
|
|
123
123
|
pod spec.name, **pod_options
|
124
|
+
|
125
|
+
# Implement local-sources option to set up dependencies to podspecs in the local filesystem.
|
126
|
+
next if generator.configuration.local_sources.empty?
|
127
|
+
generator.transitive_local_dependencies(spec, generator.configuration.local_sources).each do |dependency, podspec_file|
|
128
|
+
pod_options = generator.dependency_compilation_kwargs(dependency.name)
|
129
|
+
pod_options[:path] = if podspec_file[0] == '/' # absolute path
|
130
|
+
podspec_file
|
131
|
+
else
|
132
|
+
'../../' + podspec_file
|
133
|
+
end
|
134
|
+
pod dependency.name, **pod_options
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
def transitive_local_dependencies(spec, paths)
|
140
|
+
dependencies = spec.dependencies
|
141
|
+
return_list = []
|
142
|
+
dependencies.each do |dependency|
|
143
|
+
found_podspec_file = nil
|
144
|
+
name = dependency.name.split('/')[0]
|
145
|
+
paths.each do |path|
|
146
|
+
podspec_file = path + '/' + name + '.podspec'
|
147
|
+
next unless File.file?(podspec_file)
|
148
|
+
found_podspec_file = podspec_file
|
149
|
+
break
|
150
|
+
end
|
151
|
+
next unless found_podspec_file
|
152
|
+
return_list << [dependency, found_podspec_file]
|
153
|
+
dep_spec = Pod::Specification.from_file(found_podspec_file)
|
154
|
+
dep_spec.dependencies.each do |d_dep|
|
155
|
+
dependencies << d_dep unless dependencies.include? d_dep
|
156
|
+
end
|
124
157
|
end
|
158
|
+
return_list
|
125
159
|
end
|
126
160
|
|
127
161
|
# @return [Boolean]
|
@@ -276,6 +310,12 @@ module Pod
|
|
276
310
|
installation_options
|
277
311
|
end
|
278
312
|
|
313
|
+
def podfile_plugins
|
314
|
+
configuration.podfile_plugins.merge('cocoapods-disable-podfile-validations' => { 'no_abstract_only_pods' => true }) do |_key, old_value, new_value|
|
315
|
+
old_value.merge(new_value)
|
316
|
+
end
|
317
|
+
end
|
318
|
+
|
279
319
|
private
|
280
320
|
|
281
321
|
# @return [Array<Podfile::TargetDefinition>]
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-generate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.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-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: cocoapods-disable-podfile-validations
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.1.1
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,6 +73,7 @@ extensions: []
|
|
59
73
|
extra_rdoc_files: []
|
60
74
|
files:
|
61
75
|
- CODE_OF_CONDUCT.md
|
76
|
+
- LICENSE.md
|
62
77
|
- README.md
|
63
78
|
- VERSION
|
64
79
|
- lib/cocoapods/command/gen.rb
|
@@ -68,7 +83,8 @@ files:
|
|
68
83
|
- lib/cocoapods/generate/podfile_generator.rb
|
69
84
|
- lib/cocoapods_plugin.rb
|
70
85
|
homepage: https://github.com/square/cocoapods-generate
|
71
|
-
licenses:
|
86
|
+
licenses:
|
87
|
+
- MIT
|
72
88
|
metadata: {}
|
73
89
|
post_install_message:
|
74
90
|
rdoc_options: []
|