Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: ios/third_party/material_components_ios/BUILD.gn

Issue 2756193003: Use MDC CollectionCells bundle. (Closed)
Patch Set: cl Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/locales.gni") 5 import("//build/config/locales.gni")
6 6
7 config("config") { 7 config("config") {
8 visibility = [ ":material_components_ios" ] 8 visibility = [ ":material_components_ios" ]
9 include_dirs = [ 9 include_dirs = [
10 "src/components/AppBar/src", 10 "src/components/AppBar/src",
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 ] 241 ]
242 242
243 libs = [ 243 libs = [
244 "CoreGraphics.framework", 244 "CoreGraphics.framework",
245 "CoreText.framework", 245 "CoreText.framework",
246 "QuartzCore.framework", 246 "QuartzCore.framework",
247 "UIKit.framework", 247 "UIKit.framework",
248 ] 248 ]
249 249
250 deps = [ 250 deps = [
251 ":material_collection_cells_bundle",
251 ":material_collections_bundle", 252 ":material_collections_bundle",
252 ":material_component_ic_arrow_back_bundle", 253 ":material_component_ic_arrow_back_bundle",
253 "//ios/third_party/material_text_accessibility_ios", 254 "//ios/third_party/material_text_accessibility_ios",
254 ] 255 ]
255 256
256 foreach(icon_name, _icon_names) { 257 foreach(icon_name, _icon_names) {
257 deps += [ ":material_component_${icon_name}_bundle" ] 258 deps += [ ":material_component_${icon_name}_bundle" ]
258 } 259 }
259 260
260 public_configs = [ ":config" ] 261 public_configs = [ ":config" ]
261 262
262 configs -= [ "//build/config/compiler:chromium_code" ] 263 configs -= [ "//build/config/compiler:chromium_code" ]
263 configs += [ 264 configs += [
264 ":config", 265 ":config",
265 "//build/config/compiler:enable_arc", 266 "//build/config/compiler:enable_arc",
266 "//build/config/compiler:no_chromium_code", 267 "//build/config/compiler:no_chromium_code",
267 ] 268 ]
268 } 269 }
269 270
270 bundle_data("material_collections_bundle") { 271 _locales = [ "en" ]
272
273 foreach(locale, _locales) {
lpromero 2017/03/23 12:12:36 Is it OK to use the same for loop for both bundle_
sdefresne 2017/03/23 15:55:44 It's fine using the same loop (we can always split
274 bundle_data("material_collections_bundle_$locale") {
275 visibility = [ ":material_collections_bundle" ]
276 sources = [
277 "src/components/Collections/src/MaterialCollections.bundle/Resources/$loca le.lproj/MaterialCollections.strings",
278 ]
279 outputs = [
280 "{{bundle_root_dir}}/MaterialCollections.bundle/Resources/$locale.lproj/{{ source_file_part}}",
281 ]
282 }
283
284 bundle_data("material_collection_cells_bundle_$locale") {
285 visibility = [ ":material_collection_cells_bundle" ]
286 sources = [
287 "src/components/CollectionCells/src/MaterialCollectionCells.bundle/Resourc es/$locale.lproj/MaterialCollectionCells.strings",
288 ]
289 outputs = [
290 "{{bundle_resources_dir}}/MaterialCollectionCells.bundle/Resources/$locale .lproj/{{source_file_part}}",
291 ]
292 }
293 }
294
295 group("material_collections_bundle") {
271 visibility = [ ":material_components_ios" ] 296 visibility = [ ":material_components_ios" ]
272 sources = [ 297
273 "src/components/Collections/src/MaterialCollections.bundle/Resources/en.lpro j/MaterialCollections.strings", 298 deps = []
274 ] 299 foreach(locale, _locales) {
275 outputs = [ 300 deps += [ ":material_collections_bundle_$locale" ]
276 "{{bundle_root_dir}}/MaterialCollections.bundle/Resources/en.lproj/{{source_ file_part}}", 301 }
277 ] 302 }
303
304 group("material_collection_cells_bundle") {
305 visibility = [ ":material_components_ios" ]
306
307 deps = []
308 foreach(locale, _locales) {
309 deps += [ ":material_collection_cells_bundle_$locale" ]
310 }
278 } 311 }
279 312
280 # TODO(crbug.com/662421): Move back to _icon_names when there is just one 313 # TODO(crbug.com/662421): Move back to _icon_names when there is just one
281 # resource. 314 # resource.
282 bundle_data("material_component_ic_arrow_back_bundle") { 315 bundle_data("material_component_ic_arrow_back_bundle") {
283 visibility = [ ":material_components_ios" ] 316 visibility = [ ":material_components_ios" ]
284 sources = [ 317 sources = [
285 "src/components/private/Icons/icons/ic_arrow_back/src/MaterialIcons_ic_arrow _back.bundle/ic_arrow_back.png", 318 "src/components/private/Icons/icons/ic_arrow_back/src/MaterialIcons_ic_arrow _back.bundle/ic_arrow_back.png",
286 "src/components/private/Icons/icons/ic_arrow_back/src/MaterialIcons_ic_arrow _back.bundle/ic_arrow_back@2x.png", 319 "src/components/private/Icons/icons/ic_arrow_back/src/MaterialIcons_ic_arrow _back.bundle/ic_arrow_back@2x.png",
287 "src/components/private/Icons/icons/ic_arrow_back/src/MaterialIcons_ic_arrow _back.bundle/ic_arrow_back@3x.png", 320 "src/components/private/Icons/icons/ic_arrow_back/src/MaterialIcons_ic_arrow _back.bundle/ic_arrow_back@3x.png",
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 ] 362 ]
330 } 363 }
331 } 364 }
332 365
333 foreach(icon_name, _icon_names) { 366 foreach(icon_name, _icon_names) {
334 material_component_icon_bundle("material_component_${icon_name}_bundle") { 367 material_component_icon_bundle("material_component_${icon_name}_bundle") {
335 visibility = [ ":material_components_ios" ] 368 visibility = [ ":material_components_ios" ]
336 icon_name = "$icon_name" 369 icon_name = "$icon_name"
337 } 370 }
338 } 371 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698