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

Side by Side Diff: components/policy/BUILD.gn

Issue 1618243004: Use gn_helpers to deserialize GN lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « build/gn_helpers.py ('k') | mojo/public/mojo_application.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//build/config/features.gni") 6 import("//build/config/features.gni")
7 import("//components/policy/resources/policy_templates.gni") 7 import("//components/policy/resources/policy_templates.gni")
8 import("//third_party/protobuf/proto_library.gni") 8 import("//third_party/protobuf/proto_library.gni")
9 import("//tools/grit/grit_rule.gni") 9 import("//tools/grit/grit_rule.gni")
10 10
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 "//components/policy/proto", 278 "//components/policy/proto",
279 "//crypto", 279 "//crypto",
280 "//net", 280 "//net",
281 "//testing/gmock", 281 "//testing/gmock",
282 "//testing/gtest", 282 "//testing/gtest",
283 ] 283 ]
284 } 284 }
285 285
286 if (is_android) { 286 if (is_android) {
287 import("//build/config/android/rules.gni") 287 import("//build/config/android/rules.gni")
288 import("//build/config/zip.gni")
288 289
289 resources_name = "app_restrictions_resources" 290 resources_name = "app_restrictions_resources"
290 resources_zip = "res.java/$resources_name.zip" 291 resources_zip = "res.java/$resources_name.zip"
291 generated_resources_dir = "$root_gen_dir/chrome/app/policy/android" 292 generated_resources_dir = "$root_gen_dir/chrome/app/policy/android"
292 293
293 consolidate_target_name = "${resources_name}__consolidate_resources" 294 consolidate_target_name = "${resources_name}__consolidate_resources"
294 copy(consolidate_target_name) { 295 copy(consolidate_target_name) {
295 sources = [ 296 sources = [
296 app_restrictions_path, 297 app_restrictions_path,
297 ] 298 ]
(...skipping 11 matching lines...) Expand all
309 # use. The public rules (in rules.gni) should be updated to support what 310 # use. The public rules (in rules.gni) should be updated to support what
310 # we are doing here. 311 # we are doing here.
311 build_config_target_name = "${resources_name}__build_config" 312 build_config_target_name = "${resources_name}__build_config"
312 write_build_config(build_config_target_name) { 313 write_build_config(build_config_target_name) {
313 build_config = "$target_gen_dir/$resources_name.build_config" 314 build_config = "$target_gen_dir/$resources_name.build_config"
314 resources_zip = "$root_build_dir/$resources_zip" 315 resources_zip = "$root_build_dir/$resources_zip"
315 type = "android_resources" 316 type = "android_resources"
316 } 317 }
317 318
318 zip_target_name = "${resources_name}__create_zip" 319 zip_target_name = "${resources_name}__create_zip"
319 action(zip_target_name) { 320 zip(zip_target_name) {
320 script = "//build/android/gn/zip.py" 321 inputs = get_target_outputs(":$consolidate_target_name") +
321 outputs = [ 322 policy_templates_android_outputs
322 "$root_build_dir/$resources_zip", 323 output = "$root_build_dir/$resources_zip"
323 ] 324 base_dir = generated_resources_dir
324 generated_resources = get_target_outputs(":$consolidate_target_name") +
325 policy_templates_android_outputs
326 inputs = generated_resources
327 rebased_inputs = rebase_path(generated_resources, root_build_dir)
328 rebased_resources_dir =
329 rebase_path(generated_resources_dir, root_build_dir)
330 args = [
331 "--inputs=$rebased_inputs",
332 "--output=$resources_zip",
333 "--base-dir=$rebased_resources_dir",
334 ]
335 deps = [ 325 deps = [
336 ":$consolidate_target_name", 326 ":$consolidate_target_name",
337 ":policy_templates_grit", # For policy_templates_android_outputs. 327 ":policy_templates_grit", # For policy_templates_android_outputs.
338 ] 328 ]
339 } 329 }
340 330
341 group("app_restrictions_resources") { 331 group("app_restrictions_resources") {
342 deps = [ 332 deps = [
343 ":$build_config_target_name", 333 ":$build_config_target_name",
344 ":$zip_target_name", 334 ":$zip_target_name",
345 ] 335 ]
346 } 336 }
347 } 337 }
348 } 338 }
349 #TODO(GYP) chrome_manifest_bundle 339 #TODO(GYP) chrome_manifest_bundle
OLDNEW
« no previous file with comments | « build/gn_helpers.py ('k') | mojo/public/mojo_application.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698