Chromium Code Reviews| Index: build/config/android/internal_rules.gni |
| diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni |
| index ce6e4281883753a475433042f1727a28f64afdac..f5d9f07017bf07df99eb8c03e4ba678cf35b1731 100644 |
| --- a/build/config/android/internal_rules.gni |
| +++ b/build/config/android/internal_rules.gni |
| @@ -734,7 +734,8 @@ template("java_library_impl") { |
| assert( |
| defined(invoker.java_files) || defined(invoker.DEPRECATED_java_in_dir) || |
| - defined(invoker.srcjars) || defined(invoker.srcjar_deps)) |
| + defined(invoker.srcjars) || defined(invoker.srcjar_deps) || |
| + defined(invoker.deps)) |
| _base_path = "$target_gen_dir/$target_name" |
| _jar_path = _base_path + ".jar" |
| if (defined(invoker.jar_path)) { |
| @@ -785,11 +786,6 @@ template("java_library_impl") { |
| } |
| } |
| - _chromium_code = true |
| - if (defined(invoker.chromium_code)) { |
| - _chromium_code = invoker.chromium_code |
| - } |
| - |
| _srcjar_deps = [] |
| if (defined(invoker.srcjar_deps)) { |
| _srcjar_deps = invoker.srcjar_deps |
| @@ -822,29 +818,35 @@ template("java_library_impl") { |
| "list lines") |
| _java_files = rebase_path(_java_files_build_rel, ".", root_build_dir) |
| } |
| - assert(_java_files != [] || _srcjar_deps != [] || _srcjars != []) |
| - _final_deps += [ ":${_template_name}__compile_java" ] |
| - compile_java("${_template_name}__compile_java") { |
| - jar_path = _jar_path |
| - build_config = _build_config |
| - java_files = _java_files |
| - srcjar_deps = _srcjar_deps |
| - srcjars = _srcjars |
| - chromium_code = _chromium_code |
| - android = _requires_android |
| - |
| - if (defined(invoker.jar_excluded_patterns)) { |
| - jar_excluded_patterns = invoker.jar_excluded_patterns |
| - } |
| - if (defined(invoker.proguard_preprocess)) { |
| - proguard_preprocess = invoker.proguard_preprocess |
| + if (_java_files != [] || _srcjar_deps != [] || _srcjars != []) { |
|
cjhopman
2014/12/05 19:11:55
I don't think this is a good idea. The build_confi
ppi
2014/12/08 16:38:27
Done.
|
| + _chromium_code = true |
| + if (defined(invoker.chromium_code)) { |
| + _chromium_code = invoker.chromium_code |
| } |
| - if (defined(invoker.proguard_config)) { |
| - proguard_config = invoker.proguard_config |
| - } |
| - if (defined(invoker.dist_jar_path)) { |
| - dist_jar_path = invoker.dist_jar_path |
| + |
| + _final_deps += [ ":${_template_name}__compile_java" ] |
| + compile_java("${_template_name}__compile_java") { |
| + jar_path = _jar_path |
| + build_config = _build_config |
| + java_files = _java_files |
| + srcjar_deps = _srcjar_deps |
| + srcjars = _srcjars |
| + chromium_code = _chromium_code |
| + android = _requires_android |
| + |
| + if (defined(invoker.jar_excluded_patterns)) { |
| + jar_excluded_patterns = invoker.jar_excluded_patterns |
| + } |
| + if (defined(invoker.proguard_preprocess)) { |
| + proguard_preprocess = invoker.proguard_preprocess |
| + } |
| + if (defined(invoker.proguard_config)) { |
| + proguard_config = invoker.proguard_config |
| + } |
| + if (defined(invoker.dist_jar_path)) { |
| + dist_jar_path = invoker.dist_jar_path |
| + } |
| } |
| } |