cocoapods-generate 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b13e0f00ce8c1f769d2b12efad7689bfd8a46aa377abe04cbcd78e712b2f4e3
4
- data.tar.gz: 7f236e2188cad4f0fac8f7e3d44819acb6a152cda2bd59bd6e8d031aa3a5465d
3
+ metadata.gz: '085238f62f85be96c8083741c44ba432d1c4639d606fd2fce354c37ea07bbc69'
4
+ data.tar.gz: cd982fa728d5ce32d3555998623e3f3cc0ecabb5f724fae3bc1d9994a5c5ac96
5
5
  SHA512:
6
- metadata.gz: be0ecfd373ec36a35e41fab37ec61b30bf98fcaf69c501f8cf2798c2e45e159fa102bd7688f370749b92bd12b5fd61b3e579f44bf88591f8b80599d22d4e1417
7
- data.tar.gz: e43f56eaf2d99dec52e65015c0d5d79f8523fdb5533180a81c19b8a341f917b09ca67221a3255a35cb300dfe32699468bea6c63e3692c02db8f2bdbdd0cd13ce
6
+ metadata.gz: f5a696be86b359c2055246c007e28fcad24f68c44e1cc79f54756c7a1790d39ade858e0fc71ce8e6ddc9d38aafbbb2b85a3962aec5d08b6065e9e1d2b09def54
7
+ data.tar.gz: ad4dc0ba42d7d75cb3202ffd627d1745344e579a06a50b5ac0bf8223884355c2908cfd80ef21ae3d51b32dcfcd2647e87498f32a55121ec50bc57d435efdabae
data/README.md CHANGED
@@ -81,6 +81,11 @@ Options:
81
81
  for development pods
82
82
  --warn-for-multiple-pod-sources Whether installation should warn when a pod
83
83
  is found in multiple sources
84
+ --use-modular-headers Whether the target should be generated as
85
+ a clang module, treating dependencies as
86
+ modules, as if `use_modular_headers!`
87
+ were specified. Will error if both this
88
+ option and a podfile are specified
84
89
  ```
85
90
  <!-- end cli usage -->
86
91
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
@@ -150,6 +150,7 @@ module Pod
150
150
  option :deterministic_uuids, BOOLEAN, 'false', 'Whether installation should use deterministic UUIDs for pods projects', nil, nil, coerce_to_bool
151
151
  option :share_schemes_for_development_pods, BOOLEAN, 'true', 'Whether installation should share schemes for development pods', nil, nil, coerce_to_bool
152
152
  option :warn_for_multiple_pod_sources, BOOLEAN, 'false', 'Whether installation should warn when a pod is found in multiple sources', nil, nil, coerce_to_bool
153
+ 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
153
154
 
154
155
  options.freeze
155
156
  options.each do |o|
@@ -109,7 +109,11 @@ module Pod
109
109
  spec.available_platforms.map do |platform|
110
110
  consumer = spec.consumer(platform)
111
111
  target_name = "App-#{Platform.string_name(consumer.platform_name)}"
112
- Pod::Generator::AppTargetHelper.add_app_target(app_project, consumer.platform_name, deployment_target(consumer), target_name)
112
+ native_app_target = Pod::Generator::AppTargetHelper.add_app_target(app_project, consumer.platform_name, deployment_target(consumer), target_name)
113
+ # Temporarily set Swift version to pass validator checks for pods which do not specify Swift version.
114
+ # It will then be re-set again within #perform_post_install_steps.
115
+ Pod::Generator::AppTargetHelper.add_swift_version(native_app_target, Pod::Validator::DEFAULT_SWIFT_VERSION)
116
+ native_app_target
113
117
  end
114
118
  .tap do
115
119
  app_project.recreate_user_schemes do |scheme, target|
@@ -123,9 +123,16 @@ module Pod
123
123
  # whether all pods should use modular headers
124
124
  #
125
125
  def use_modular_headers?
126
- return false unless configuration.use_podfile?
127
- target_definition_list.all? do |target_definition|
128
- target_definition.use_modular_headers_hash['all']
126
+ if configuration.use_podfile? && configuration.use_modular_headers?
127
+ raise Informative, 'Conflicting `use_modular_headers` option. Cannot specify both `--use-modular-headers` and `--use-podfile`.'
128
+ end
129
+
130
+ if configuration.use_podfile?
131
+ target_definition_list.all? do |target_definition|
132
+ target_definition.use_modular_headers_hash['all']
133
+ end
134
+ else
135
+ configuration.use_modular_headers?
129
136
  end
130
137
  end
131
138
 
@@ -257,7 +264,7 @@ module Pod
257
264
  # @param [String] pod_name
258
265
  #
259
266
  def modular_headers?(pod_name)
260
- return false unless configuration.use_podfile?
267
+ return true if configuration.use_modular_headers?
261
268
  target_definitions_for_pod(pod_name).all? do |target_definition|
262
269
  target_definition.build_pod_as_module?(pod_name)
263
270
  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.0.0
4
+ version: 1.1.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-06-21 00:00:00.000000000 Z
11
+ date: 2018-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler