Commit 3e5be326 authored by Christopher Grant's avatar Christopher Grant Committed by Commit Bot

Android: Unify pak resource generation for Chrome and Monochrome

Previously, Monochrome used its own set of GN targets to package
resources, analogous to the ones used for Chrome (some of which are the
same used for non-Android platforms).  This change moves both variants
to use matching sets of template-generated targets.

Later, when bundle-specific native libraries are added, this common
template can be reused again.

BUG=874584

Change-Id: Ia9c34cb0dfa8754207bdee146dbde47f9aca78d3
Reviewed-on: https://chromium-review.googlesource.com/c/1318418
Commit-Queue: Christopher Grant <cjgrant@chromium.org>
Reviewed-by: default avataragrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606060}
parent e2bf93de
...@@ -38,10 +38,7 @@ _java_target_whitelist = [ ...@@ -38,10 +38,7 @@ _java_target_whitelist = [
] ]
# Targets that match the whitelist but are not actually java targets. # Targets that match the whitelist but are not actually java targets.
_java_target_blacklist = [ _java_target_blacklist = [ "*:*_unpack_aar" ]
"//chrome:packed_resources",
"*:*_unpack_aar",
]
_default_proguard_jar_path = "//third_party/proguard/lib/proguard.jar" _default_proguard_jar_path = "//third_party/proguard/lib/proguard.jar"
......
...@@ -1634,25 +1634,27 @@ if (is_chrome_branded && !is_android) { ...@@ -1634,25 +1634,27 @@ if (is_chrome_branded && !is_android) {
} }
} }
chrome_paks("packed_resources") { if (!is_android) {
if (is_mac) { chrome_paks("packed_resources") {
output_dir = "$root_gen_dir/repack" if (is_mac) {
copy_data_to_bundle = true output_dir = "$root_gen_dir/repack"
} else { copy_data_to_bundle = true
output_dir = root_out_dir } else {
} output_dir = root_out_dir
}
if (enable_resource_whitelist_generation) { if (enable_resource_whitelist_generation) {
repack_whitelist = chrome_resource_whitelist repack_whitelist = chrome_resource_whitelist
deps = [ deps = [
"//chrome:resource_whitelist", "//chrome:resource_whitelist",
] ]
} }
if (is_chrome_branded && !is_mac && !is_android) { if (is_chrome_branded && !is_mac) {
public_deps = [ public_deps = [
":default_apps", ":default_apps",
] ]
}
} }
} }
......
This diff is collapsed.
...@@ -264,7 +264,7 @@ template("monochrome_public_common_apk_or_module_tmpl") { ...@@ -264,7 +264,7 @@ template("monochrome_public_common_apk_or_module_tmpl") {
"//android_webview/apk:webview_license_activity_java", "//android_webview/apk:webview_license_activity_java",
"//android_webview/glue", "//android_webview/glue",
"//chrome/android:chrome_public_non_pak_assets", "//chrome/android:chrome_public_non_pak_assets",
"//chrome/android:monochrome_pak_assets", "//chrome/android:monochrome_apk_pak_assets",
"//chrome/android/monochrome:monochrome_license_provider_java", "//chrome/android/monochrome:monochrome_license_provider_java",
] ]
......
...@@ -4145,10 +4145,14 @@ test("unit_tests") { ...@@ -4145,10 +4145,14 @@ test("unit_tests") {
} }
if (!is_mac) { if (!is_mac) {
deps += [ deps += [
"//chrome:packed_resources",
"//chrome/tools/convert_dict:lib", "//chrome/tools/convert_dict:lib",
"//third_party/hunspell", "//third_party/hunspell",
] ]
if (is_android) {
deps += [ "//chrome/android:chrome_apk_paks" ]
} else {
deps += [ "//chrome:packed_resources" ]
}
} }
if (is_win || is_mac || is_chromeos) { if (is_win || is_mac || is_chromeos) {
sources += [ "../browser/extensions/api/networking_private/networking_private_crypto_unittest.cc" ] sources += [ "../browser/extensions/api/networking_private/networking_private_crypto_unittest.cc" ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment