| Index: build/android/gyp/process_resources.py
|
| diff --git a/build/android/gyp/process_resources.py b/build/android/gyp/process_resources.py
|
| index 7a5fdf83e316bc95f0f7730add619a4c7b9ce345..d227954ae96af22f748c6ab35b16780a5e1fa522 100755
|
| --- a/build/android/gyp/process_resources.py
|
| +++ b/build/android/gyp/process_resources.py
|
| @@ -23,7 +23,8 @@ import generate_v14_compatible_resources
|
| from util import build_utils
|
|
|
| # Import jinja2 from third_party/jinja2
|
| -sys.path.append(os.path.join(os.path.dirname(__file__), '../../../third_party'))
|
| +sys.path.insert(1,
|
| + os.path.join(os.path.dirname(__file__), '../../../third_party'))
|
| from jinja2 import Template # pylint: disable=F0401
|
|
|
|
|
| @@ -37,8 +38,8 @@ def ParseArgs(args):
|
| build_utils.AddDepfileOption(parser)
|
|
|
| parser.add_option('--android-sdk', help='path to the Android SDK folder')
|
| - parser.add_option('--android-sdk-tools',
|
| - help='path to the Android SDK build tools folder')
|
| + parser.add_option('--aapt-path',
|
| + help='path to the Android aapt tool')
|
| parser.add_option('--non-constant-id', action='store_true')
|
|
|
| parser.add_option('--android-manifest', help='AndroidManifest.xml path')
|
| @@ -68,11 +69,9 @@ def ParseArgs(args):
|
| help='Path to proguard.txt generated file')
|
|
|
| parser.add_option(
|
| - '--v14-verify-only',
|
| - action='store_true',
|
| - help='Do not generate v14 resources. Instead, just verify that the '
|
| - 'resources are already compatible with v14, i.e. they don\'t use '
|
| - 'attributes that cause crashes on certain devices.')
|
| + '--v14-skip',
|
| + action="store_true",
|
| + help='Do not generate nor verify v14 resources')
|
|
|
| parser.add_option(
|
| '--extra-res-packages',
|
| @@ -103,7 +102,7 @@ def ParseArgs(args):
|
| # Check that required options have been provided.
|
| required_options = (
|
| 'android_sdk',
|
| - 'android_sdk_tools',
|
| + 'aapt_path',
|
| 'android_manifest',
|
| 'dependencies_res_zips',
|
| 'resource_dirs',
|
| @@ -304,7 +303,7 @@ def main():
|
|
|
| options = ParseArgs(args)
|
| android_jar = os.path.join(options.android_sdk, 'android.jar')
|
| - aapt = os.path.join(options.android_sdk_tools, 'aapt')
|
| + aapt = options.aapt_path
|
|
|
| input_files = []
|
|
|
| @@ -319,11 +318,11 @@ def main():
|
|
|
| input_resource_dirs = build_utils.ParseGypList(options.resource_dirs)
|
|
|
| - for resource_dir in input_resource_dirs:
|
| - generate_v14_compatible_resources.GenerateV14Resources(
|
| - resource_dir,
|
| - v14_dir,
|
| - options.v14_verify_only)
|
| + if not options.v14_skip:
|
| + for resource_dir in input_resource_dirs:
|
| + generate_v14_compatible_resources.GenerateV14Resources(
|
| + resource_dir,
|
| + v14_dir)
|
|
|
| dep_zips = build_utils.ParseGypList(options.dependencies_res_zips)
|
| input_files += dep_zips
|
|
|