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

Unified Diff: android_webview/BUILD.gn

Issue 2354803002: Create Monochrome-specific repack() targets (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | build/config/android/internal_rules.gni » ('j') | chrome/chrome_paks.gni » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/BUILD.gn
diff --git a/android_webview/BUILD.gn b/android_webview/BUILD.gn
index c2cbd8bbb238725f21e511c4e3f4a07815143491..5a688a3bbe190e4cc8054f93889fe95a10ebc132 100644
--- a/android_webview/BUILD.gn
+++ b/android_webview/BUILD.gn
@@ -5,6 +5,7 @@
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
import("//build/config/locales.gni")
+import("//chrome/chrome_paks.gni")
import("//tools/grit/repack.gni")
import("//tools/resources/generate_resource_whitelist.gni")
import("system_webview_apk_tmpl.gni")
@@ -18,6 +19,10 @@ declare_args() {
if (!defined(use_webview_internal_framework)) {
use_webview_internal_framework = false
}
+if (enable_resource_whitelist_generation) {
+ monochrome_resource_whitelist =
+ "$target_gen_dir/monochrome_resource_whitelist.txt"
+}
if (enable_resource_whitelist_generation) {
system_webview_pak_whitelist =
@@ -168,7 +173,46 @@ android_assets("pak_file_assets") {
disable_compression = true
}
-# These assets are needed by both monochrome and stand alone WebView, but not by
+if (enable_resource_whitelist_generation) {
+ generate_resource_whitelist("monochrome_resource_whitelist") {
+ deps = [
+ "//chrome/android:monochrome",
+ ]
+ input = "$root_out_dir/libmonochrome$shlib_extension.whitelist"
+ output = monochrome_resource_whitelist
+ }
+}
+
+chrome_paks("monochrome_paks") {
+ output_dir = "$target_gen_dir/$target_name"
+
+ if (enable_resource_whitelist_generation) {
+ repack_whitelist = monochrome_resource_whitelist
+ deps = [
+ ":monochrome_resource_whitelist",
+ ]
+ }
+}
+
+java_group("monochrome_assets") {
+ deps = [
+ ":monochrome_pak_assets",
+ ":monochrome_webview_assets",
+ ]
+}
+
+android_assets("monochrome_pak_assets") {
+ sources = [
+ "$target_gen_dir/monochrome_paks/chrome_100_percent.pak",
+ "$target_gen_dir/monochrome_paks/resources.pak",
+ ]
+ deps = [
+ ":monochrome_paks",
+ ]
+ disable_compression = true
+}
+
+# These assets are needed by both monochrome and standalone WebView, but not by
# Chrome.
android_assets("monochrome_webview_assets") {
sources = [
« no previous file with comments | « no previous file | build/config/android/internal_rules.gni » ('j') | chrome/chrome_paks.gni » ('J')

Powered by Google App Engine
This is Rietveld 408576698