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.
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).
8 # To use this, create a gyp target with the following form:
10 # 'target_name': 'my-package_java',
13 # 'java_in_dir': 'path/to/package/root',
15 # 'includes': ['path/to/this/gypi/file'],
19 # res_dir - The top-level resources folder.
20 # rules_file - Path to the file containing jar-jar rules.
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)'],
29 'action_name': 'jarjar resources',
30 'message': 'Copying and jar-jaring resources for <(_target_name)',
32 'out_dir': '<(intermediate_dir)/jarjar_res',
35 '<(DEPTH)/build/android/gyp/util/build_utils.py',
36 '<(DEPTH)/build/android/gyp/jarjar_resources.py',
37 '>@(resource_input_paths)',
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)',