OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 # This file is meant to be included into a target to provide a rule | 5 # This file is meant to be included into a target to provide a rule |
6 # to build Java in a consistent manner. | 6 # to build Java in a consistent manner. |
7 # | 7 # |
8 # To use this, create a gyp target with the following form: | 8 # To use this, create a gyp target with the following form: |
9 # { | 9 # { |
10 # 'target_name': 'my-package_java', | 10 # 'target_name': 'my-package_java', |
11 # 'type': 'none', | 11 # 'type': 'none', |
12 # 'variables': { | 12 # 'variables': { |
13 # 'package_name': 'my-package', | 13 # 'package_name': 'my-package', |
14 # 'java_in_dir': 'path/to/package/root', | 14 # 'java_in_dir': 'path/to/package/root', |
15 # }, | 15 # }, |
16 # 'includes': ['path/to/this/gypi/file'], | 16 # 'includes': ['path/to/this/gypi/file'], |
17 # } | 17 # } |
18 # | 18 # |
19 # The generated jar-file will be: | 19 # The generated jar-file will be: |
20 # <(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar | 20 # <(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar |
21 # | |
22 # Required variables: | 21 # Required variables: |
23 # package_name - Used to name the intermediate output directory and in the | 22 # package_name - Used to name the intermediate output directory and in the |
24 # names of some output files. | 23 # names of some output files. |
25 # java_in_dir - The top-level java directory. The src should be in | 24 # java_in_dir - The top-level java directory. The src should be in |
26 # <java_in_dir>/src. | 25 # <java_in_dir>/src. |
27 # Optional/automatic variables: | 26 # Optional/automatic variables: |
28 # additional_input_paths - These paths will be included in the 'inputs' list to | 27 # additional_input_paths - These paths will be included in the 'inputs' list to |
29 # ensure that this target is rebuilt when one of these paths changes. | 28 # ensure that this target is rebuilt when one of these paths changes. |
30 # additional_src_dirs - Additional directories with .java files to be compiled | 29 # additional_src_dirs - Additional directories with .java files to be compiled |
31 # and included in the output of this target. | 30 # and included in the output of this target. |
(...skipping 28 matching lines...) Expand all Loading... |
60 'android/ant/chromium-jars.xml', | 59 'android/ant/chromium-jars.xml', |
61 '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")', | 60 '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")', |
62 '>@(input_jars_paths)', | 61 '>@(input_jars_paths)', |
63 '>@(additional_input_paths)', | 62 '>@(additional_input_paths)', |
64 ], | 63 ], |
65 'outputs': [ | 64 'outputs': [ |
66 '<(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar', | 65 '<(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar', |
67 ], | 66 ], |
68 'action': [ | 67 'action': [ |
69 'ant', | 68 'ant', |
| 69 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', |
70 '-DANDROID_SDK=<(android_sdk)', | 70 '-DANDROID_SDK=<(android_sdk)', |
71 '-DANDROID_SDK_ROOT=<(android_sdk_root)', | 71 '-DANDROID_SDK_ROOT=<(android_sdk_root)', |
72 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', | 72 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', |
73 '-DANDROID_SDK_VERSION=<(android_sdk_version)', | 73 '-DANDROID_SDK_VERSION=<(android_sdk_version)', |
74 '-DANDROID_GDBSERVER=<(android_gdbserver)', | 74 '-DANDROID_GDBSERVER=<(android_gdbserver)', |
75 '-DPRODUCT_DIR=<(ant_build_out)', | 75 '-DPRODUCT_DIR=<(ant_build_out)', |
76 | 76 |
77 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', | 77 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', |
78 '-DGENERATED_SRC_DIRS=>(generated_src_dirs)', | 78 '-DGENERATED_SRC_DIRS=>(generated_src_dirs)', |
79 '-DINPUT_JARS_PATHS=>(input_jars_paths)', | 79 '-DINPUT_JARS_PATHS=>(input_jars_paths)', |
80 '-DPACKAGE_NAME=<(package_name)', | 80 '-DPACKAGE_NAME=<(package_name)', |
81 | 81 |
82 '-Dbasedir=<(java_in_dir)', | 82 '-Dbasedir=<(java_in_dir)', |
83 '-buildfile', | 83 '-buildfile', |
84 '<(DEPTH)/build/android/ant/chromium-jars.xml' | 84 '<(DEPTH)/build/android/ant/chromium-jars.xml' |
85 ] | 85 ] |
86 }, | 86 }, |
87 ], | 87 ], |
88 } | 88 } |
OLD | NEW |