Chromium Code Reviews| Index: build/java.gypi |
| diff --git a/build/java.gypi b/build/java.gypi |
| index 249f063be6bbebe197bfbc40113ff0b1fcfb5487..4f1f504baec7b22cc41c0bc5cc8303f3525c7bf3 100644 |
| --- a/build/java.gypi |
| +++ b/build/java.gypi |
| @@ -16,16 +16,25 @@ |
| # 'includes': ['path/to/this/gypi/file'], |
| # } |
| # |
| -# Note that this assumes that there's ant buildfile with package_name in |
| -# java_in_dir. So if if you have package_name="base" and |
| -# java_in_dir="base/android/java" you should have a directory structure like: |
| -# |
| -# base/android/java/base.xml |
| -# base/android/java/org/chromium/base/Foo.java |
| -# base/android/java/org/chromium/base/Bar.java |
| -# |
| -# Finally, the generated jar-file will be: |
| +# The generated jar-file will be: |
| # <(PRODUCT_DIR)/lib.java/chromium_base.jar |
|
Yaron
2012/09/27 23:31:30
replace "base" with package name
cjhopman
2012/09/28 01:07:21
Done.
|
| +# |
| +# Required variables: |
| +# package_name - Used to name the intermediate output directory and in the |
| +# names of some output files. |
| +# java_in_dir - The top-level java directory. The src should be in |
| +# <java_in_dir>/src. |
| +# Optional/automatic variables: |
| +# additional_input_paths - These paths will be included in the 'inputs' list to |
| +# ensure that this target is rebuilt when one of these paths changes. |
| +# additional_src_dirs - Additional directories with .java files to be compiled |
| +# and included in the output of this target. |
| +# generated_src_dirs - Same as additional_src_dirs except used for .java files |
| +# that are generated at build time. This should be set automatically by a |
| +# target's dependencies. The .java files in these directories are not |
| +# included in the 'inputs' list (unlike additional_src_dirs). |
| +# input_jars_paths - The path to jars to be included in the classpath. This |
| +# should be filled automatically by depending on the appropriate targets. |
| { |
| 'dependencies': [ |
| @@ -40,6 +49,7 @@ |
| 'input_jars_paths': [], |
| 'additional_src_dirs': [], |
| 'additional_input_paths': [], |
| + 'generated_src_dirs': [], |
| }, |
| 'actions': [ |
| { |
| @@ -48,7 +58,7 @@ |
| 'inputs': [ |
| 'android/ant/common.xml', |
| 'android/ant/chromium-jars.xml', |
| - '<!@(find <(java_in_dir) -name "*.java")', |
| + '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")', |
| '>@(input_jars_paths)', |
| '>@(additional_input_paths)', |
| ], |
| @@ -57,15 +67,18 @@ |
| ], |
| 'action': [ |
| 'ant', |
| - '-DPRODUCT_DIR=<(ant_build_out)', |
| - '-DPACKAGE_NAME=<(package_name)', |
| - '-DINPUT_JARS_PATHS=>(input_jars_paths)', |
| - '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', |
| '-DANDROID_SDK=<(android_sdk)', |
| '-DANDROID_SDK_ROOT=<(android_sdk_root)', |
| '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', |
| '-DANDROID_SDK_VERSION=<(android_sdk_version)', |
| '-DANDROID_GDBSERVER=<(android_gdbserver)', |
| + '-DPRODUCT_DIR=<(ant_build_out)', |
| + |
| + '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', |
| + '-DGENERATED_SRC_DIRS=>(generated_src_dirs)', |
| + '-DINPUT_JARS_PATHS=>(input_jars_paths)', |
| + '-DPACKAGE_NAME=<(package_name)', |
| + |
| '-Dbasedir=<(java_in_dir)', |
| '-buildfile', |
| '<(DEPTH)/build/android/ant/chromium-jars.xml' |