| Index: build/java_apk.gypi
|
| diff --git a/build/java_apk.gypi b/build/java_apk.gypi
|
| index f9387cd2d6675bc98c5bfeddda2d52a99e1a205b..0431f9d74423e84b1022cd6dbf85ff3f688071cc 100644
|
| --- a/build/java_apk.gypi
|
| +++ b/build/java_apk.gypi
|
| @@ -513,19 +513,27 @@
|
| 'action_name': 'javac_<(_target_name)',
|
| 'message': 'Compiling java for <(_target_name)',
|
| 'variables': {
|
| - 'all_src_dirs': [
|
| - '<(java_in_dir)/src',
|
| + 'gen_src_dirs': [
|
| '<(intermediate_dir)/gen',
|
| - '>@(additional_src_dirs)',
|
| '>@(generated_src_dirs)',
|
| ],
|
| + # If there is a separate find for additional_src_dirs, it will find the
|
| + # wrong .java files when additional_src_dirs is empty.
|
| + # TODO(thakis): Gyp caches >! evaluation by command. Both java.gypi and
|
| + # java_apk.gypi evaluate the same command, and at the moment two targets
|
| + # set java_in_dir to "java". Add a dummy comment here to make sure
|
| + # that the two targets (one uses java.gypi, the other java_apk.gypi)
|
| + # get distinct source lists. Medium-term, make targets list all their
|
| + # Java files instead of using find. (As is, this will be broken if two
|
| + # targets use the same java_in_dir and both use java_apk.gypi or
|
| + # both use java.gypi.)
|
| + 'java_source_list': '>|(javasources.<(_target_name).gypcmd >!@(find >(java_in_dir)/src >(additional_src_dirs) -name "*.java" # apk))',
|
| +
|
| },
|
| 'inputs': [
|
| '<(DEPTH)/build/android/gyp/util/build_utils.py',
|
| '<(DEPTH)/build/android/gyp/javac.py',
|
| - # If there is a separate find for additional_src_dirs, it will find the
|
| - # wrong .java files when additional_src_dirs is empty.
|
| - '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")',
|
| + '>(java_source_list)',
|
| '>@(input_jars_paths)',
|
| '<(codegen_stamp)',
|
| '>@(compile_input_paths)',
|
| @@ -537,7 +545,8 @@
|
| 'python', '<(DEPTH)/build/android/gyp/javac.py',
|
| '--output-dir=<(classes_dir)',
|
| '--classpath=>(input_jars_paths) <(android_sdk_jar)',
|
| - '--src-dirs=>(all_src_dirs)',
|
| + '--src-filelist=>(java_source_list)',
|
| + '--src-gendirs=>(gen_src_dirs)',
|
| '--javac-includes=<(javac_includes)',
|
| '--chromium-code=<(chromium_code)',
|
| '--stamp=<(compile_stamp)',
|
|
|