Index: build/config/android/internal_rules.gni |
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni |
index 613cb077ff43b074f7d45a483bc7b7d026467806..f974812c0c703d065e130c4a62a08047f9623783 100644 |
--- a/build/config/android/internal_rules.gni |
+++ b/build/config/android/internal_rules.gni |
@@ -1226,9 +1226,7 @@ template("java_library_impl") { |
} |
_java_files = [] |
- if (defined(invoker.java_files)) { |
- _java_files = invoker.java_files |
- } else if (defined(invoker.DEPRECATED_java_in_dir)) { |
+ if (defined(invoker.DEPRECATED_java_in_dir)) { |
_src_dir = invoker.DEPRECATED_java_in_dir + "/src" |
_src_dir_exists = exec_script("//build/dir_exists.py", |
[ rebase_path(_src_dir, root_build_dir) ], |
@@ -1237,16 +1235,20 @@ template("java_library_impl") { |
"In GN, java_in_dir should be the fully specified java directory " + |
"(i.e. including the trailing \"/src\")") |
- _java_files_build_rel = exec_script( |
- "//build/android/gyp/find.py", |
- [ |
- "--pattern", |
- "*.java", |
- rebase_path(invoker.DEPRECATED_java_in_dir, root_build_dir), |
- ], |
- "list lines") |
+ _java_files_build_rel = |
+ exec_script("//build/android/gyp/find.py", |
+ [ |
+ "--pattern", |
+ "*.java", |
+ rebase_path(invoker.DEPRECATED_java_in_dir, |
+ root_build_dir), |
+ ], |
+ "list lines") |
_java_files = rebase_path(_java_files_build_rel, ".", root_build_dir) |
} |
+ if (defined(invoker.java_files)) { |
+ _java_files += invoker.java_files |
+ } |
assert(_java_files != [] || _srcjar_deps != [] || _srcjars != []) |
_compile_java_target = "${_template_name}__compile_java" |