diff options
author | mkosiba@chromium.org <mkosiba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-20 22:47:21 +0000 |
---|---|---|
committer | mkosiba@chromium.org <mkosiba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-20 22:47:21 +0000 |
commit | ca6b5d0f13f12c9accc65a683f5868fc5d3c15b0 (patch) | |
tree | e114ab50e10975d556fcacb96055ec4b493ce922 /android_webview/build | |
parent | e3fd0bd10b02144e394532f2be15cfc0cfe27382 (diff) | |
download | chromium_src-ca6b5d0f13f12c9accc65a683f5868fc5d3c15b0.zip chromium_src-ca6b5d0f13f12c9accc65a683f5868fc5d3c15b0.tar.gz chromium_src-ca6b5d0f13f12c9accc65a683f5868fc5d3c15b0.tar.bz2 |
JarJar resources when building the android_webview.
The android_webview build will require there only be
a single R class (details in bug).
This change makes the necessary changes to the build
infrastructure for this to happen but the actual swap
to building the webview this way will land as a subsequent
CL.
BUG=387155
build-only change, all trybots compile fine.
NOTRY=true
Review URL: https://codereview.chromium.org/255613003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/build')
-rw-r--r-- | android_webview/build/AndroidManifest.xml | 4 | ||||
-rw-r--r-- | android_webview/build/jarjar_resources.gypi | 50 | ||||
-rw-r--r-- | android_webview/build/resources_config.mk | 17 |
3 files changed, 71 insertions, 0 deletions
diff --git a/android_webview/build/AndroidManifest.xml b/android_webview/build/AndroidManifest.xml new file mode 100644 index 0000000..5e8c3db --- /dev/null +++ b/android_webview/build/AndroidManifest.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.android.webview.chromium"> +</manifest> diff --git a/android_webview/build/jarjar_resources.gypi b/android_webview/build/jarjar_resources.gypi new file mode 100644 index 0000000..17838c6 --- /dev/null +++ b/android_webview/build/jarjar_resources.gypi @@ -0,0 +1,50 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# +# This file is meant to be included into a target to provide a rule +# to run the equivalent of jarjar on Java resources (layout.xml files). +# +# To use this, create a gyp target with the following form: +# { +# 'target_name': 'my-package_java', +# 'type': 'none', +# 'variables': { +# 'java_in_dir': 'path/to/package/root', +# }, +# 'includes': ['path/to/this/gypi/file'], +# } +# +# Required variables: +# res_dir - The top-level resources folder. +# rules_file - Path to the file containing jar-jar rules. + +{ + 'variables': { + 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)', + 'jarjar_stamp': '<(intermediate_dir)/jarjar_resources.stamp', + 'resource_input_paths': ['<!@(find <(res_dir) -type f)'], + }, + 'actions': [{ + 'action_name': 'jarjar resources', + 'message': 'Copying and jar-jaring resources for <(_target_name)', + 'variables': { + 'out_dir': '<(intermediate_dir)/jarjar_res', + }, + 'inputs': [ + '<(DEPTH)/build/android/gyp/util/build_utils.py', + '<(DEPTH)/build/android/gyp/jarjar_resources.py', + '>@(resource_input_paths)', + ], + 'outputs': [ + '<(jarjar_stamp)', + ], + 'action': [ + 'python', '../build/android/gyp/jarjar_resources.py', + '--input-dir', '<(res_dir)', + '--output-dir', '<(out_dir)', + '--rules-path', '<(rules_file)', + '--stamp', '<(jarjar_stamp)', + ] + }], +} diff --git a/android_webview/build/resources_config.mk b/android_webview/build/resources_config.mk new file mode 100644 index 0000000..f9ab135 --- /dev/null +++ b/android_webview/build/resources_config.mk @@ -0,0 +1,17 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +android_webview_manifest_file := $(call my-dir)/AndroidManifest.xml + +# resources +android_webview_resources_dirs := \ + $(call intermediates-dir-for,GYP,shared,,,$(TARGET_2ND_ARCH))/android_webview_jarjar_content_resources/jarjar_res \ + $(call intermediates-dir-for,GYP,shared,,,$(TARGET_2ND_ARCH))/android_webview_jarjar_ui_resources/jarjar_res \ + $(call intermediates-dir-for,GYP,ui_strings_grd,,,$(TARGET_2ND_ARCH))/ui_strings_grd/res_grit \ + $(call intermediates-dir-for,GYP,content_strings_grd,,,$(TARGET_2ND_ARCH))/content_strings_grd/res_grit + +android_webview_aapt_flags := --auto-add-overlay +android_webview_aapt_flags += --custom-package com.android.webview.chromium +android_webview_aapt_flags += --extra-packages org.chromium.ui +android_webview_aapt_flags += --extra-packages org.chromium.content |