Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Unified Diff: build/config/android/internal_rules.gni

Issue 2632283002: Use more generic approach to pack java resources into final APK. (Closed)
Patch Set: GypList->GnList Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/gyp/write_build_config.py ('k') | build/config/android/rules.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « build/android/gyp/write_build_config.py ('k') | build/config/android/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698