[android] Generate strings.xml for android_webview.
This makes it possible for the android_webview component to generate strings.xml files from .grd files in the android_webview_build configuration. BUG=internal b/11505352 TESTS=compile TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/270633015 git-svn-id: http://src.chromium.org/svn/trunk/src/build@269779 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
039f46ed0e
Коммит
b20b5084b2
25
java.gypi
25
java.gypi
|
@ -39,8 +39,6 @@
|
|||
# R_package - The java package in which the R class (which maps resources to
|
||||
# integer IDs) should be generated, e.g. org.chromium.content.
|
||||
# R_package_relpath - Same as R_package, but replace each '.' with '/'.
|
||||
# java_strings_grd - The name of the grd file from which to generate localized
|
||||
# strings.xml files, if any.
|
||||
# res_extra_dirs - A list of extra directories containing Android resources.
|
||||
# These directories may be generated at build time.
|
||||
# res_extra_files - A list of the files in res_extra_dirs.
|
||||
|
@ -66,7 +64,6 @@
|
|||
'generated_src_dirs': ['>@(generated_R_dirs)'],
|
||||
'generated_R_dirs': [],
|
||||
'has_java_resources%': 0,
|
||||
'java_strings_grd%': '',
|
||||
'res_extra_dirs': [],
|
||||
'res_extra_files': [],
|
||||
'res_v14_verify_only%': 0,
|
||||
|
@ -150,28 +147,6 @@
|
|||
'additional_R_text_files': ['<(R_text_file)'],
|
||||
},
|
||||
},
|
||||
'conditions': [
|
||||
['java_strings_grd != ""', {
|
||||
'variables': {
|
||||
'res_grit_dir': '<(intermediate_dir)/res_grit',
|
||||
'res_input_dirs': ['<(res_grit_dir)'],
|
||||
'grit_grd_file': '<(java_in_dir)/strings/<(java_strings_grd)',
|
||||
'resource_input_paths': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(res_grit_dir)" <(grit_grd_file))'],
|
||||
},
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'generate_localized_strings_xml',
|
||||
'variables': {
|
||||
'grit_additional_defines': ['-E', 'ANDROID_JAVA_TAGGED_ONLY=false'],
|
||||
'grit_out_dir': '<(res_grit_dir)',
|
||||
# resource_ids is unneeded since we don't generate .h headers.
|
||||
'grit_resource_ids': '',
|
||||
},
|
||||
'includes': ['../build/grit_action.gypi'],
|
||||
},
|
||||
],
|
||||
}],
|
||||
],
|
||||
'actions': [
|
||||
# Generate R.java and crunch image resources.
|
||||
{
|
||||
|
|
|
@ -44,8 +44,6 @@
|
|||
# resource_dir - The directory for resources.
|
||||
# R_package - A custom Java package to generate the resource file R.java in.
|
||||
# By default, the package given in AndroidManifest.xml will be used.
|
||||
# java_strings_grd - The name of the grd file from which to generate localized
|
||||
# strings.xml files, if any.
|
||||
# use_chromium_linker - Enable the content dynamic linker that allows sharing the
|
||||
# RELRO section of the native libraries between the different processes.
|
||||
# enable_chromium_linker_tests - Enable the content dynamic linker test support
|
||||
|
@ -70,7 +68,6 @@
|
|||
'additional_res_dirs': [],
|
||||
'additional_res_packages': [],
|
||||
'is_test_apk%': 0,
|
||||
'java_strings_grd%': '',
|
||||
'resource_input_paths': [],
|
||||
'intermediate_dir': '<(PRODUCT_DIR)/<(_target_name)',
|
||||
'asset_location%': '<(intermediate_dir)/assets',
|
||||
|
@ -393,29 +390,6 @@
|
|||
},
|
||||
],
|
||||
}],
|
||||
['java_strings_grd != ""', {
|
||||
'variables': {
|
||||
'res_grit_dir': '<(SHARED_INTERMEDIATE_DIR)/<(package_name)_apk/res_grit',
|
||||
'additional_res_dirs': ['<(res_grit_dir)'],
|
||||
# grit_grd_file is used by grit_action.gypi, included below.
|
||||
'grit_grd_file': '<(java_in_dir)/strings/<(java_strings_grd)',
|
||||
'resource_input_paths': [
|
||||
'<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(res_grit_dir)" <(grit_grd_file))'
|
||||
],
|
||||
},
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'generate_localized_strings_xml',
|
||||
'variables': {
|
||||
'grit_additional_defines': ['-E', 'ANDROID_JAVA_TAGGED_ONLY=false'],
|
||||
'grit_out_dir': '<(res_grit_dir)',
|
||||
# resource_ids is unneeded since we don't generate .h headers.
|
||||
'grit_resource_ids': '',
|
||||
},
|
||||
'includes': ['../build/grit_action.gypi'],
|
||||
},
|
||||
],
|
||||
}],
|
||||
['gyp_managed_install == 1', {
|
||||
'actions': [
|
||||
{
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
# 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 generate localized strings.xml from a grd file.
|
||||
#
|
||||
# To use this, create a gyp target with the following form:
|
||||
# {
|
||||
# 'target_name': 'my-package_strings_grd',
|
||||
# 'type': 'none',
|
||||
# 'variables': {
|
||||
# 'grd_file': 'path/to/grd/file',
|
||||
# },
|
||||
# 'includes': ['path/to/this/gypi/file'],
|
||||
# }
|
||||
#
|
||||
# Required variables:
|
||||
# grd_file - The path to the grd file to use.
|
||||
{
|
||||
'variables': {
|
||||
'intermediate_dir': '<(PRODUCT_DIR)/<(_target_name)',
|
||||
'res_grit_dir': '<(intermediate_dir)/res_grit',
|
||||
'grit_grd_file': '<(grd_file)',
|
||||
'resource_input_paths': [
|
||||
'<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(res_grit_dir)" <(grd_file))'
|
||||
],
|
||||
},
|
||||
'all_dependent_settings': {
|
||||
'variables': {
|
||||
'additional_res_dirs': ['<@(res_grit_dir)'],
|
||||
'dependencies_res_files': ['<@(resource_input_paths)'],
|
||||
'dependencies_res_input_dirs': ['<@(res_grit_dir)'],
|
||||
},
|
||||
},
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'generate_localized_strings_xml',
|
||||
'variables': {
|
||||
'grit_additional_defines': ['-E', 'ANDROID_JAVA_TAGGED_ONLY=false'],
|
||||
'grit_out_dir': '<(res_grit_dir)',
|
||||
# resource_ids is unneeded since we don't generate .h headers.
|
||||
'grit_resource_ids': '',
|
||||
},
|
||||
'includes': ['../build/grit_action.gypi'],
|
||||
},
|
||||
],
|
||||
}
|
Загрузка…
Ссылка в новой задаче