OLD | NEW |
| (Empty) |
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 | |
3 # found in the LICENSE file. | |
4 # | |
5 # This file is meant to be included into a target to provide a rule | |
6 # to run the equivalent of jarjar on Java resources (layout.xml files). | |
7 # | |
8 # To use this, create a gyp target with the following form: | |
9 # { | |
10 # 'target_name': 'my-package_java', | |
11 # 'type': 'none', | |
12 # 'variables': { | |
13 # 'java_in_dir': 'path/to/package/root', | |
14 # }, | |
15 # 'includes': ['path/to/this/gypi/file'], | |
16 # } | |
17 # | |
18 # Required variables: | |
19 # res_dir - The top-level resources folder. | |
20 # rules_file - Path to the file containing jar-jar rules. | |
21 | |
22 { | |
23 'variables': { | |
24 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)', | |
25 'jarjar_stamp': '<(intermediate_dir)/jarjar_resources.stamp', | |
26 'resource_input_paths': ['<!@(find <(res_dir) -type f | sort)'], | |
27 }, | |
28 'actions': [{ | |
29 'action_name': 'jarjar resources', | |
30 'message': 'Copying and jar-jaring resources for <(_target_name)', | |
31 'variables': { | |
32 'out_dir': '<(intermediate_dir)/jarjar_res', | |
33 }, | |
34 'inputs': [ | |
35 '<(DEPTH)/build/android/gyp/util/build_utils.py', | |
36 '<(DEPTH)/build/android/gyp/jarjar_resources.py', | |
37 '>@(resource_input_paths)', | |
38 ], | |
39 'outputs': [ | |
40 '<(jarjar_stamp)', | |
41 ], | |
42 'action': [ | |
43 'python', '../build/android/gyp/jarjar_resources.py', | |
44 '--input-dir', '<(res_dir)', | |
45 '--output-dir', '<(out_dir)', | |
46 '--rules-path', '<(rules_file)', | |
47 '--stamp', '<(jarjar_stamp)', | |
48 ] | |
49 }], | |
50 } | |
OLD | NEW |