Index: build/config/android/internal_rules.gni |
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni |
index e075c8353f092b8d2785f572002c7c779d4c3714..889e8b6bcd2fbd061f980e8b8e1e6cd1c7401c89 100644 |
--- a/build/config/android/internal_rules.gni |
+++ b/build/config/android/internal_rules.gni |
@@ -178,6 +178,10 @@ template("dex") { |
inputs = invoker.inputs |
} |
+ if (defined(invoker.deps)) { |
+ deps = invoker.deps |
+ } |
+ |
rebased_output = rebase_path(invoker.output, root_build_dir) |
args = [ |
@@ -516,6 +520,11 @@ template("android_java_library") { |
assert(defined(invoker.jar_path)) |
assert(defined(invoker.dex_path)) |
+ _srcjar_deps = [] |
+ if (defined(invoker.srcjar_deps)) { |
+ _srcjar_deps = invoker.srcjar_deps |
+ } |
+ |
_java_files = [] |
if (defined(invoker.java_files)) { |
_java_files = invoker.java_files |
@@ -531,6 +540,7 @@ template("android_java_library") { |
) |
_java_files = rebase_path(_java_files_build_rel, ".", root_build_dir) |
} |
+ assert(_java_files != [] || _srcjar_deps != []) |
_jar_path = invoker.jar_path |
_dex_path = invoker.dex_path |
@@ -542,6 +552,7 @@ template("android_java_library") { |
assert(_android_manifest != "") |
_final_deps = [] |
+ _final_datadeps = [] |
java_library("${target_name}__java_library") { |
jar_path = _jar_path |
@@ -550,18 +561,20 @@ template("android_java_library") { |
} |
build_config = invoker.build_config |
java_files = _java_files |
+ srcjar_deps = _srcjar_deps |
- if (defined(invoker.srcjar_deps)) { |
- srcjar_deps = invoker.srcjar_deps |
- } |
if (defined(invoker.proguard_preprocess) && invoker.proguard_preprocess) { |
proguard_preprocess = invoker.proguard_preprocess |
proguard_config = invoker.proguard_config |
} |
+ |
+ if (defined(invoker.dist_jar_path)) { |
+ dist_jar_path = invoker.dist_jar_path |
+ } |
} |
if (defined(invoker.chromium_code) && invoker.chromium_code) { |
- _final_deps += [ ":${target_name}__lint" ] |
+ _final_datadeps += [ ":${target_name}__lint" ] |
android_lint("${target_name}__lint") { |
android_manifest = _android_manifest |
jar_path = _jar_path |
@@ -578,7 +591,7 @@ template("android_java_library") { |
deps = [ |
":${target_name}__java_library", |
":${target_name}__dex", |
- ] + _final_deps |
+ ] + _final_deps + _final_datadeps |
} |
} |