Index: build/config/android/internal_rules.gni |
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni |
index a662457991889175ee89e235d28e4f293e60d545..d01ccb884f07ff90eb6722ab2ad78fbacedfdf3d 100644 |
--- a/build/config/android/internal_rules.gni |
+++ b/build/config/android/internal_rules.gni |
@@ -178,6 +178,12 @@ template("write_build_config") { |
] |
} |
+ if (is_java && defined(invoker.java_resources_jar)) { |
+ args += [ |
+ "--java-resources-jar-path", |
+ rebase_path(invoker.java_resources_jar, root_build_dir), |
+ ] |
+ } |
if (is_apk || is_deps_dex || (is_java && supports_android)) { |
args += [ |
"--dex-path", |
@@ -1339,6 +1345,10 @@ if (enable_java_templates) { |
"--assets=@FileArg($_rebased_build_config:assets)", |
"--uncompressed-assets=@FileArg($_rebased_build_config:uncompressed_assets)", |
] |
+ |
+ # TODO(mlopatkin) We are relying on the fact that assets_build_config is |
+ # an APK build_config. |
+ args += [ "--java-resources=@FileArg($_rebased_build_config:java_resources_jars)" ] |
} |
if (defined(invoker.write_asset_list) && invoker.write_asset_list) { |
args += [ "--write-asset-list" ] |
@@ -1380,12 +1390,6 @@ if (enable_java_templates) { |
] |
} |
- if (defined(invoker.emma_instrument) && invoker.emma_instrument) { |
- _emma_device_jar = "$android_sdk_root/tools/lib/emma_device.jar" |
- _rebased_emma_device_jar = rebase_path(_emma_device_jar, root_build_dir) |
- args += [ "--emma-device-jar=$_rebased_emma_device_jar" ] |
- } |
- |
if (defined(invoker.uncompress_shared_libraries) && |
invoker.uncompress_shared_libraries) { |
args += [ "--uncompress-shared-libraries" ] |
@@ -1697,7 +1701,6 @@ if (enable_java_templates) { |
forward_variables_from(invoker, |
[ |
"assets_build_config", |
- "emma_instrument", |
"native_lib_placeholders", |
"native_libs_filearg", |
"secondary_abi_native_libs_filearg", |
@@ -1721,7 +1724,6 @@ if (enable_java_templates) { |
forward_variables_from(invoker, |
[ |
"assets_build_config", |
- "emma_instrument", |
"secondary_native_libs", |
"uncompress_shared_libraries", |
]) |
@@ -1887,6 +1889,12 @@ if (enable_java_templates) { |
if (_supports_android) { |
dex_path = _dex_path |
} |
+ if (defined(invoker.include_java_resources) && |
+ invoker.include_java_resources) { |
+ # Use original jar_path because _jar_path points to a library without |
+ # resources. |
+ java_resources_jar = invoker.jar_path |
+ } |
} |
process_java_prebuilt(_process_jar_target_name) { |