Index: build/config/android/internal_rules.gni |
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni |
index 986a56cfd4b53e3f8ea8b2fcdcd215f308d8295b..54eccd26deb9b9f4a22be2feea00d489b346dd2a 100644 |
--- a/build/config/android/internal_rules.gni |
+++ b/build/config/android/internal_rules.gni |
@@ -198,6 +198,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", |
@@ -1249,6 +1255,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" ] |
@@ -1282,12 +1292,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" ] |
@@ -1597,7 +1601,6 @@ if (enable_java_templates) { |
forward_variables_from(invoker, |
[ |
"assets_build_config", |
- "emma_instrument", |
"native_lib_placeholders", |
"native_libs_filearg", |
"secondary_native_libs", |
@@ -1620,7 +1623,6 @@ if (enable_java_templates) { |
forward_variables_from(invoker, |
[ |
"assets_build_config", |
- "emma_instrument", |
"secondary_native_libs", |
"uncompress_shared_libraries", |
]) |
@@ -1775,6 +1777,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) { |