cocoapods-generate 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/cocoapods/generate/installer.rb +13 -1
- data/lib/cocoapods/generate/podfile_generator.rb +15 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8dd5896fe293bf4d05fd83c9caba0324b05f7b857abebb93369b816762a968f
|
4
|
+
data.tar.gz: f826e9c99158d30fa2ff14d6821ebd4f4c3d8dca538f9c7d36bc9d40c759eac0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30e56968b0b6de1b50c61711d8493f9db0f2ada2f7fb95a71f4507b1ea2386c9c4d4fbc21cdbe9aa4bd464e5a8802318d91ff81ae766c9be87bee199727864ba
|
7
|
+
data.tar.gz: f3d0bccb1e79f54099116a1321ae25d8f3c497a906ec95821948905b2ac6286dfddeec35447ef601f82c8cb6abb0b0b60c11bec73b766f25ca68e6b037170b4c
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.3.0
|
@@ -117,7 +117,11 @@ module Pod
|
|
117
117
|
end
|
118
118
|
.tap do
|
119
119
|
app_project.recreate_user_schemes do |scheme, target|
|
120
|
-
|
120
|
+
installation_result = installation_result_from_target(target)
|
121
|
+
next unless installation_result
|
122
|
+
installation_result.test_native_targets.each do |test_native_target|
|
123
|
+
scheme.add_test_target(test_native_target)
|
124
|
+
end
|
121
125
|
end
|
122
126
|
end
|
123
127
|
.each do |target|
|
@@ -196,6 +200,14 @@ module Pod
|
|
196
200
|
app_project.save
|
197
201
|
end
|
198
202
|
|
203
|
+
def installation_result_from_target(target)
|
204
|
+
return unless target.respond_to?(:symbol_type)
|
205
|
+
library_product_types = %i[framework dynamic_library static_library]
|
206
|
+
return unless library_product_types.include? target.symbol_type
|
207
|
+
|
208
|
+
results_by_native_target[target]
|
209
|
+
end
|
210
|
+
|
199
211
|
def remove_script_phase_from_target(native_target, script_phase_name)
|
200
212
|
script_phase = native_target.shell_script_build_phases.find { |bp| bp.name && bp.name.end_with?(script_phase_name) }
|
201
213
|
return unless script_phase.present?
|
@@ -56,6 +56,11 @@ module Pod
|
|
56
56
|
self.defined_in_file = dir.join('Podfile.yaml')
|
57
57
|
|
58
58
|
test_specs = spec.recursive_subspecs.select(&:test_specification?)
|
59
|
+
app_specs = if spec.respond_to?(:app_specification?)
|
60
|
+
spec.recursive_subspecs.select(&:app_specification?)
|
61
|
+
else
|
62
|
+
[]
|
63
|
+
end
|
59
64
|
|
60
65
|
# Stick all of the transitive dependencies in an abstract target.
|
61
66
|
# This allows us to force CocoaPods to use the versions / sources / external sources
|
@@ -65,6 +70,8 @@ module Pod
|
|
65
70
|
pods_for_transitive_dependencies = [spec.name]
|
66
71
|
.concat(test_specs.map(&:name))
|
67
72
|
.concat(test_specs.flat_map { |ts| ts.dependencies.flat_map(&:name) })
|
73
|
+
.concat(app_specs.map(&:name))
|
74
|
+
.concat(app_specs.flat_map { |as| as.dependencies.flat_map(&:name) })
|
68
75
|
|
69
76
|
dependencies = generator
|
70
77
|
.transitive_dependencies_by_pod
|
@@ -82,7 +89,7 @@ module Pod
|
|
82
89
|
end
|
83
90
|
|
84
91
|
# Add platform-specific concrete targets that inherit the
|
85
|
-
# `pod` declaration for the local pod
|
92
|
+
# `pod` declaration for the local pod.
|
86
93
|
spec.available_platforms.map(&:string_name).sort.each do |platform_name|
|
87
94
|
target "App-#{platform_name}" do
|
88
95
|
current_target_definition.swift_version = generator.swift_version if generator.swift_version
|
@@ -106,10 +113,13 @@ module Pod
|
|
106
113
|
|
107
114
|
# This is the pod declaration for the local pod,
|
108
115
|
# it will be inherited by the concrete target definitions below
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
116
|
+
pod_options = generator.dependency_compilation_kwargs(spec.name)
|
117
|
+
pod_options[:path] = spec.defined_in_file.relative_path_from(dir).to_s
|
118
|
+
{ testspecs: test_specs, appspecs: app_specs }.each do |key, specs|
|
119
|
+
pod_options[key] = specs.map { |s| s.name.sub(%r{^#{Regexp.escape spec.root.name}/}, '') }.sort unless specs.empty?
|
120
|
+
end
|
121
|
+
|
122
|
+
pod spec.name, **pod_options
|
113
123
|
end
|
114
124
|
end
|
115
125
|
|
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.3.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: 2018-
|
11
|
+
date: 2018-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|