2012-09-19 08:16:27 +04:00
|
|
|
# Copyright (c) 2012 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 build Android APKs in a consistent manner.
|
|
|
|
#
|
|
|
|
# To use this, create a gyp target with the following form:
|
|
|
|
# {
|
|
|
|
# 'target_name': 'my_package_apk',
|
|
|
|
# 'type': 'none',
|
|
|
|
# 'variables': {
|
|
|
|
# 'apk_name': 'MyPackage',
|
|
|
|
# 'java_in_dir': 'path/to/package/root',
|
2013-03-26 21:35:21 +04:00
|
|
|
# 'resource_dir': 'path/to/package/root/res',
|
2012-09-19 08:16:27 +04:00
|
|
|
# },
|
|
|
|
# 'includes': ['path/to/this/gypi/file'],
|
|
|
|
# }
|
|
|
|
#
|
2012-09-28 22:22:29 +04:00
|
|
|
# Required variables:
|
2012-10-19 01:52:16 +04:00
|
|
|
# apk_name - The final apk will be named <apk_name>.apk
|
2012-09-28 22:22:29 +04:00
|
|
|
# java_in_dir - The top-level java directory. The src should be in
|
2013-02-21 02:39:17 +04:00
|
|
|
# <(java_in_dir)/src.
|
2012-09-28 22:22:29 +04:00
|
|
|
# Optional/automatic variables:
|
|
|
|
# additional_input_paths - These paths will be included in the 'inputs' list to
|
|
|
|
# ensure that this target is rebuilt when one of these paths changes.
|
2015-02-07 05:34:11 +03:00
|
|
|
# additional_res_packages - Package names of R.java files generated in addition
|
|
|
|
# to the default package name defined in AndroidManifest.xml.
|
2012-09-28 22:22:29 +04:00
|
|
|
# additional_src_dirs - Additional directories with .java files to be compiled
|
|
|
|
# and included in the output of this target.
|
2014-07-09 17:06:44 +04:00
|
|
|
# additional_bundled_libs - Additional libraries what will be stripped and
|
|
|
|
# bundled in the apk.
|
2013-03-26 21:35:21 +04:00
|
|
|
# asset_location - The directory where assets are located.
|
2012-09-28 22:22:29 +04:00
|
|
|
# generated_src_dirs - Same as additional_src_dirs except used for .java files
|
|
|
|
# that are generated at build time. This should be set automatically by a
|
|
|
|
# target's dependencies. The .java files in these directories are not
|
|
|
|
# included in the 'inputs' list (unlike additional_src_dirs).
|
|
|
|
# input_jars_paths - The path to jars to be included in the classpath. This
|
|
|
|
# should be filled automatically by depending on the appropriate targets.
|
2012-11-17 00:39:20 +04:00
|
|
|
# is_test_apk - Set to 1 if building a test apk. This prevents resources from
|
|
|
|
# dependencies from being re-included.
|
2013-04-04 13:15:59 +04:00
|
|
|
# native_lib_target - The target_name of the target which generates the final
|
|
|
|
# shared library to be included in this apk. A stripped copy of the
|
|
|
|
# library will be included in the apk.
|
2012-10-17 23:07:14 +04:00
|
|
|
# resource_dir - The directory for resources.
|
2014-11-08 05:08:39 +03:00
|
|
|
# shared_resources - Make a resource package that can be loaded by a different
|
|
|
|
# application at runtime to access the package's resources.
|
2012-11-20 06:17:23 +04:00
|
|
|
# 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.
|
2015-05-11 22:11:29 +03:00
|
|
|
# include_all_resources - Set to 1 to include all resource IDs in all generated
|
|
|
|
# R.java files.
|
2014-02-10 20:19:22 +04:00
|
|
|
# use_chromium_linker - Enable the content dynamic linker that allows sharing the
|
2013-10-22 01:40:44 +04:00
|
|
|
# RELRO section of the native libraries between the different processes.
|
2014-06-27 20:59:46 +04:00
|
|
|
# load_library_from_zip_file - When using the dynamic linker, load the library
|
|
|
|
# directly out of the zip file.
|
2014-07-04 23:58:34 +04:00
|
|
|
# use_relocation_packer - Enable relocation packing. Relies on the chromium
|
|
|
|
# linker, so use_chromium_linker must also be enabled.
|
2014-02-10 20:19:22 +04:00
|
|
|
# enable_chromium_linker_tests - Enable the content dynamic linker test support
|
2013-10-22 01:40:44 +04:00
|
|
|
# code. This allows a test APK to inject a Linker.TestRunner instance at
|
2014-02-10 20:19:22 +04:00
|
|
|
# runtime. Should only be used by the chromium_linker_test_apk target!!
|
2013-12-11 07:02:10 +04:00
|
|
|
# never_lint - Set to 1 to not run lint on this target.
|
2014-09-09 15:44:02 +04:00
|
|
|
# java_in_dir_suffix - To override the /src suffix on java_in_dir.
|
|
|
|
# app_manifest_version_name - set the apps 'human readable' version number.
|
|
|
|
# app_manifest_version_code - set the apps version number.
|
2012-09-19 08:16:27 +04:00
|
|
|
{
|
|
|
|
'variables': {
|
Make test apks only dex files not in tested apk (proguard version)
At runtime, the classloader will look for classes in both apk's dex
files. In the standard Android build system, an instrumentation test
apk's dex file does not include the classes included in the tested apk's
dex file.
To do this, when doing obfuscation for an apk, write the list of
libraries included in the obfuscated jar and the list of proguard config
files. Then, when proguarding the test apk's code, exclude those
libraries included in the tested apk, use the configs from the tested
apk, and apply the proguard mapping (the renames from obfuscation). Also
add some extra test-specific proguard options.
Now that the test apk does not bundle its own copy of all the tested
apk's classes, some things may need to be kept in the main apk just for
tests. However, we already keep everything in org.chromium.** and
com.google.android.apps.** because of the fact that the test apk was
using its own copy of all the classes and so we couldn't depend on the
tests to actually catch us from over-optimizing with proguard.
BUG=272790
Review URL: https://codereview.chromium.org/321883002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@277257 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-14 23:51:58 +04:00
|
|
|
'tested_apk_obfuscated_jar_path%': '/',
|
2014-06-13 00:28:16 +04:00
|
|
|
'tested_apk_dex_path%': '/',
|
2012-10-05 20:51:32 +04:00
|
|
|
'additional_input_paths': [],
|
2012-09-19 08:16:27 +04:00
|
|
|
'input_jars_paths': [],
|
2013-03-28 03:31:27 +04:00
|
|
|
'library_dexed_jars_paths': [],
|
2012-09-28 22:22:29 +04:00
|
|
|
'additional_src_dirs': [],
|
|
|
|
'generated_src_dirs': [],
|
2012-10-10 05:29:46 +04:00
|
|
|
'app_manifest_version_name%': '<(android_app_version_name)',
|
|
|
|
'app_manifest_version_code%': '<(android_app_version_code)',
|
2014-05-27 09:42:45 +04:00
|
|
|
# aapt generates this proguard.txt.
|
|
|
|
'generated_proguard_file': '<(intermediate_dir)/proguard.txt',
|
2012-10-10 05:29:46 +04:00
|
|
|
'proguard_enabled%': 'false',
|
2014-05-27 09:42:45 +04:00
|
|
|
'proguard_flags_paths': ['<(generated_proguard_file)'],
|
2013-03-27 00:44:29 +04:00
|
|
|
'jar_name': 'chromium_apk_<(_target_name).jar',
|
2013-03-26 21:35:21 +04:00
|
|
|
'resource_dir%':'<(DEPTH)/build/android/ant/empty/res',
|
2012-11-20 06:17:23 +04:00
|
|
|
'R_package%':'',
|
2015-05-11 22:11:29 +03:00
|
|
|
'include_all_resources%': 0,
|
2013-04-06 04:14:39 +04:00
|
|
|
'additional_R_text_files': [],
|
2014-06-11 05:20:55 +04:00
|
|
|
'dependencies_res_zip_paths': [],
|
2012-11-17 00:39:20 +04:00
|
|
|
'additional_res_packages': [],
|
2014-07-09 17:06:44 +04:00
|
|
|
'additional_bundled_libs%': [],
|
2012-11-17 00:39:20 +04:00
|
|
|
'is_test_apk%': 0,
|
2014-07-29 22:11:33 +04:00
|
|
|
'extensions_to_not_compress%': '',
|
2013-03-26 21:35:21 +04:00
|
|
|
'resource_input_paths': [],
|
|
|
|
'intermediate_dir': '<(PRODUCT_DIR)/<(_target_name)',
|
|
|
|
'asset_location%': '<(intermediate_dir)/assets',
|
|
|
|
'codegen_stamp': '<(intermediate_dir)/codegen.stamp',
|
2013-04-03 00:36:13 +04:00
|
|
|
'package_input_paths': [],
|
2013-04-02 03:12:33 +04:00
|
|
|
'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json',
|
2014-07-09 17:06:44 +04:00
|
|
|
'additional_ordered_libraries_file': '<(intermediate_dir)/additional_native_libraries.json',
|
2014-02-10 20:19:22 +04:00
|
|
|
'native_libraries_template': '<(DEPTH)/base/android/java/templates/NativeLibraries.template',
|
2013-04-02 03:12:33 +04:00
|
|
|
'native_libraries_java_dir': '<(intermediate_dir)/native_libraries_java/',
|
|
|
|
'native_libraries_java_file': '<(native_libraries_java_dir)/NativeLibraries.java',
|
|
|
|
'native_libraries_java_stamp': '<(intermediate_dir)/native_libraries_java.stamp',
|
|
|
|
'native_libraries_template_data_dir': '<(intermediate_dir)/native_libraries/',
|
|
|
|
'native_libraries_template_data_file': '<(native_libraries_template_data_dir)/native_libraries_array.h',
|
2013-11-28 18:28:52 +04:00
|
|
|
'native_libraries_template_version_file': '<(native_libraries_template_data_dir)/native_libraries_version.h',
|
2013-03-26 21:35:21 +04:00
|
|
|
'compile_stamp': '<(intermediate_dir)/compile.stamp',
|
2013-12-11 07:02:10 +04:00
|
|
|
'lint_stamp': '<(intermediate_dir)/lint.stamp',
|
|
|
|
'lint_result': '<(intermediate_dir)/lint_result.xml',
|
|
|
|
'lint_config': '<(intermediate_dir)/lint_config.xml',
|
|
|
|
'never_lint%': 0,
|
2015-03-24 06:14:39 +03:00
|
|
|
'findbugs_stamp': '<(intermediate_dir)/findbugs.stamp',
|
|
|
|
'run_findbugs%': 0,
|
2014-09-09 15:44:02 +04:00
|
|
|
'java_in_dir_suffix%': '/src',
|
2013-08-22 04:08:31 +04:00
|
|
|
'instr_stamp': '<(intermediate_dir)/instr.stamp',
|
2013-03-27 00:44:29 +04:00
|
|
|
'jar_stamp': '<(intermediate_dir)/jar.stamp',
|
|
|
|
'obfuscate_stamp': '<(intermediate_dir)/obfuscate.stamp',
|
2014-07-04 23:58:34 +04:00
|
|
|
'pack_arm_relocations_stamp': '<(intermediate_dir)/pack_arm_relocations.stamp',
|
2013-04-02 07:23:14 +04:00
|
|
|
'strip_stamp': '<(intermediate_dir)/strip.stamp',
|
2014-07-10 00:51:21 +04:00
|
|
|
'stripped_libraries_dir': '<(intermediate_dir)/stripped_libraries',
|
2014-07-09 17:06:44 +04:00
|
|
|
'strip_additional_stamp': '<(intermediate_dir)/strip_additional.stamp',
|
2014-09-27 03:22:44 +04:00
|
|
|
'version_stamp': '<(intermediate_dir)/version.stamp',
|
2013-03-27 00:44:29 +04:00
|
|
|
'javac_includes': [],
|
|
|
|
'jar_excluded_classes': [],
|
2014-06-23 22:42:13 +04:00
|
|
|
'javac_jar_path': '<(intermediate_dir)/<(_target_name).javac.jar',
|
2013-03-27 00:44:29 +04:00
|
|
|
'jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)',
|
|
|
|
'obfuscated_jar_path': '<(intermediate_dir)/obfuscated.jar',
|
2014-06-11 17:19:47 +04:00
|
|
|
'test_jar_path': '<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar',
|
2013-03-27 00:44:29 +04:00
|
|
|
'dex_path': '<(intermediate_dir)/classes.dex',
|
2013-08-22 04:08:31 +04:00
|
|
|
'emma_device_jar': '<(android_sdk_root)/tools/lib/emma_device.jar',
|
2013-04-06 04:14:39 +04:00
|
|
|
'android_manifest_path%': '<(java_in_dir)/AndroidManifest.xml',
|
2015-05-19 19:58:32 +03:00
|
|
|
'split_android_manifest_path': '<(intermediate_dir)/split-manifests/<(android_app_abi)/AndroidManifest.xml',
|
2013-04-03 00:36:13 +04:00
|
|
|
'push_stamp': '<(intermediate_dir)/push.stamp',
|
|
|
|
'link_stamp': '<(intermediate_dir)/link.stamp',
|
2014-06-11 05:20:55 +04:00
|
|
|
'resource_zip_path': '<(intermediate_dir)/<(_target_name).resources.zip',
|
2014-11-08 05:08:39 +03:00
|
|
|
'shared_resources%': 0,
|
2013-04-06 04:14:39 +04:00
|
|
|
'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk',
|
2015-05-19 19:58:32 +03:00
|
|
|
'final_abi_split_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name)-abi-<(android_app_abi).apk',
|
2013-06-25 22:42:07 +04:00
|
|
|
'incomplete_apk_path': '<(intermediate_dir)/<(apk_name)-incomplete.apk',
|
2013-04-19 13:16:13 +04:00
|
|
|
'apk_install_record': '<(intermediate_dir)/apk_install.record.stamp',
|
2014-05-21 08:03:14 +04:00
|
|
|
'device_intermediate_dir': '/data/data/org.chromium.gyp_managed_install/<(_target_name)/<(CONFIGURATION_NAME)',
|
2013-04-19 13:16:13 +04:00
|
|
|
'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh',
|
2013-04-23 22:30:26 +04:00
|
|
|
'symlink_script_device_path': '<(device_intermediate_dir)/create_symlinks.sh',
|
2013-06-25 22:42:07 +04:00
|
|
|
'create_standalone_apk%': 1,
|
2015-05-15 01:17:59 +03:00
|
|
|
'res_v14_skip%': 0,
|
2013-04-24 23:31:22 +04:00
|
|
|
'variables': {
|
2013-06-25 22:42:07 +04:00
|
|
|
'variables': {
|
|
|
|
'native_lib_target%': '',
|
2013-11-28 18:28:52 +04:00
|
|
|
'native_lib_version_name%': '',
|
2014-02-10 20:19:22 +04:00
|
|
|
'use_chromium_linker%' : 0,
|
2014-07-04 23:58:34 +04:00
|
|
|
'use_relocation_packer%' : 0,
|
2014-02-10 20:19:22 +04:00
|
|
|
'enable_chromium_linker_tests%': 0,
|
2013-10-31 00:33:12 +04:00
|
|
|
'is_test_apk%': 0,
|
2015-05-19 19:58:32 +03:00
|
|
|
'unsigned_apk_path': '<(intermediate_dir)/<(apk_name)-unsigned.apk',
|
|
|
|
'unsigned_abi_split_apk_path': '<(intermediate_dir)/<(apk_name)-abi-<(android_app_abi)-unsigned.apk',
|
|
|
|
'create_abi_split%': 0,
|
2013-06-25 22:42:07 +04:00
|
|
|
},
|
2015-05-19 19:58:32 +03:00
|
|
|
'unsigned_apk_path': '<(unsigned_apk_path)',
|
|
|
|
'unsigned_abi_split_apk_path': '<(unsigned_abi_split_apk_path)',
|
|
|
|
'create_abi_split%': '<(create_abi_split)',
|
2013-04-24 23:31:22 +04:00
|
|
|
'conditions': [
|
2013-06-25 22:42:07 +04:00
|
|
|
['gyp_managed_install == 1 and native_lib_target != ""', {
|
2015-05-19 19:58:32 +03:00
|
|
|
'conditions': [
|
|
|
|
['create_abi_split == 0', {
|
|
|
|
'unsigned_standalone_apk_path': '<(intermediate_dir)/<(apk_name)-standalone-unsigned.apk',
|
|
|
|
}, {
|
|
|
|
'unsigned_standalone_apk_path': '<(intermediate_dir)/<(apk_name)-abi-<(android_app_abi)-standalone-unsigned.apk',
|
|
|
|
}],
|
|
|
|
],
|
2013-06-25 22:42:07 +04:00
|
|
|
}, {
|
|
|
|
'unsigned_standalone_apk_path': '<(unsigned_apk_path)',
|
|
|
|
}],
|
2013-04-24 23:31:22 +04:00
|
|
|
['gyp_managed_install == 1', {
|
|
|
|
'apk_package_native_libs_dir': '<(intermediate_dir)/libs.managed',
|
|
|
|
}, {
|
|
|
|
'apk_package_native_libs_dir': '<(intermediate_dir)/libs',
|
|
|
|
}],
|
2013-10-31 00:33:12 +04:00
|
|
|
['is_test_apk == 0 and emma_coverage != 0', {
|
2014-04-30 15:22:41 +04:00
|
|
|
'emma_instrument%': 1,
|
2013-10-31 00:33:12 +04:00
|
|
|
},{
|
2014-04-30 15:22:41 +04:00
|
|
|
'emma_instrument%': 0,
|
2013-10-31 00:33:12 +04:00
|
|
|
}],
|
2015-05-19 19:58:32 +03:00
|
|
|
# When using abi splits, the abi split is modified by
|
|
|
|
# gyp_managed_install rather than the main .apk
|
|
|
|
['create_abi_split == 1', {
|
|
|
|
'managed_input_apk_path': '<(unsigned_abi_split_apk_path)',
|
|
|
|
}, {
|
|
|
|
'managed_input_apk_path': '<(unsigned_apk_path)',
|
|
|
|
}],
|
2013-04-24 23:31:22 +04:00
|
|
|
],
|
|
|
|
},
|
2013-06-25 22:42:07 +04:00
|
|
|
'native_lib_target%': '',
|
2013-11-28 18:28:52 +04:00
|
|
|
'native_lib_version_name%': '',
|
2014-02-10 20:19:22 +04:00
|
|
|
'use_chromium_linker%' : 0,
|
Revert 281286 "Add gyp machinery to build with packed ARM relati..."
Broke Android compile:
FAILED: cd ../../net; python ../build/android/gyp/pack_arm_relocations.py "--enable-packing=0" "--stripped-libraries-dir=../out/Release/gen/stripped_libraries" "--packed-libraries-dir=../out/Release/net_unittests_apk/libs/armeabi-v7a" "--libraries-file=../out/Release/net_unittests_apk/native_libraries.json" "--stamp=../out/Release/net_unittests_apk/pack_arm_relocations.stamp"
Traceback (most recent call last):
File "../build/android/gyp/pack_arm_relocations.py", line 108, in <module>
sys.exit(main())
File "../build/android/gyp/pack_arm_relocations.py", line 99, in main
CopyArmLibraryUnchanged(library_path, output_path)
File "../build/android/gyp/pack_arm_relocations.py", line 58, in CopyArmLibraryUnchanged
shutil.copy(library_path, output_path)
File "/usr/lib/python2.7/shutil.py", line 117, in copy
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 2] No such file or directory: u'../out/Release/net_unittests_apk/libs/armeabi-v7a/libnet_unittests.so'
ninja: build stopped: subcommand failed.
> Add gyp machinery to build with packed ARM relative relocations.
>
> Add gypi and python files to support packing ARM relative relocations
> during the build process.
>
> Define a use_relocation_packer gyp variable to turn ARM relocation
> packing on and off (currently set to 0).
>
> BUG=385553
>
> Review URL: https://codereview.chromium.org/358863002
TBR=simonb@chromium.org
Review URL: https://codereview.chromium.org/370633002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@281303 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-03 22:39:41 +04:00
|
|
|
'load_library_from_zip_file%' : 0,
|
2014-07-04 23:58:34 +04:00
|
|
|
'use_relocation_packer%' : 0,
|
|
|
|
'enable_chromium_linker_tests%': 0,
|
2014-04-30 15:22:41 +04:00
|
|
|
'emma_instrument%': '<(emma_instrument)',
|
2013-04-24 23:31:22 +04:00
|
|
|
'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)',
|
2013-06-25 22:42:07 +04:00
|
|
|
'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)',
|
2015-05-19 19:58:32 +03:00
|
|
|
'unsigned_apk_path': '<(unsigned_apk_path)',
|
|
|
|
'unsigned_abi_split_apk_path': '<(unsigned_abi_split_apk_path)',
|
|
|
|
'create_abi_split%': '<(create_abi_split)',
|
|
|
|
'managed_input_apk_path': '<(managed_input_apk_path)',
|
2014-07-04 23:58:34 +04:00
|
|
|
'libchromium_android_linker': 'libchromium_android_linker.>(android_product_extension)',
|
2013-09-20 21:44:33 +04:00
|
|
|
'extra_native_libs': [],
|
2014-09-18 07:57:26 +04:00
|
|
|
'native_lib_placeholder_stamp': '<(apk_package_native_libs_dir)/<(android_app_abi)/native_lib_placeholder.stamp',
|
|
|
|
'native_lib_placeholders': [],
|
2015-05-19 19:58:32 +03:00
|
|
|
'main_apk_name': '<(apk_name)',
|
2012-09-19 08:16:27 +04:00
|
|
|
},
|
2012-11-16 11:31:49 +04:00
|
|
|
# Pass the jar path to the apk's "fake" jar target. This would be better as
|
|
|
|
# direct_dependent_settings, but a variable set by a direct_dependent_settings
|
|
|
|
# cannot be lifted in a dependent to all_dependent_settings.
|
|
|
|
'all_dependent_settings': {
|
Make test apks only dex files not in tested apk (proguard version)
At runtime, the classloader will look for classes in both apk's dex
files. In the standard Android build system, an instrumentation test
apk's dex file does not include the classes included in the tested apk's
dex file.
To do this, when doing obfuscation for an apk, write the list of
libraries included in the obfuscated jar and the list of proguard config
files. Then, when proguarding the test apk's code, exclude those
libraries included in the tested apk, use the configs from the tested
apk, and apply the proguard mapping (the renames from obfuscation). Also
add some extra test-specific proguard options.
Now that the test apk does not bundle its own copy of all the tested
apk's classes, some things may need to be kept in the main apk just for
tests. However, we already keep everything in org.chromium.** and
com.google.android.apps.** because of the fact that the test apk was
using its own copy of all the classes and so we couldn't depend on the
tests to actually catch us from over-optimizing with proguard.
BUG=272790
Review URL: https://codereview.chromium.org/321883002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@277257 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-14 23:51:58 +04:00
|
|
|
'conditions': [
|
|
|
|
['proguard_enabled == "true"', {
|
|
|
|
'variables': {
|
2014-06-18 21:53:45 +04:00
|
|
|
'proguard_enabled': 'true',
|
Make test apks only dex files not in tested apk (proguard version)
At runtime, the classloader will look for classes in both apk's dex
files. In the standard Android build system, an instrumentation test
apk's dex file does not include the classes included in the tested apk's
dex file.
To do this, when doing obfuscation for an apk, write the list of
libraries included in the obfuscated jar and the list of proguard config
files. Then, when proguarding the test apk's code, exclude those
libraries included in the tested apk, use the configs from the tested
apk, and apply the proguard mapping (the renames from obfuscation). Also
add some extra test-specific proguard options.
Now that the test apk does not bundle its own copy of all the tested
apk's classes, some things may need to be kept in the main apk just for
tests. However, we already keep everything in org.chromium.** and
com.google.android.apps.** because of the fact that the test apk was
using its own copy of all the classes and so we couldn't depend on the
tests to actually catch us from over-optimizing with proguard.
BUG=272790
Review URL: https://codereview.chromium.org/321883002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@277257 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-14 23:51:58 +04:00
|
|
|
}
|
|
|
|
}],
|
|
|
|
],
|
2012-11-16 11:31:49 +04:00
|
|
|
'variables': {
|
2014-03-31 20:36:26 +04:00
|
|
|
'apk_output_jar_path': '<(jar_path)',
|
Make test apks only dex files not in tested apk (proguard version)
At runtime, the classloader will look for classes in both apk's dex
files. In the standard Android build system, an instrumentation test
apk's dex file does not include the classes included in the tested apk's
dex file.
To do this, when doing obfuscation for an apk, write the list of
libraries included in the obfuscated jar and the list of proguard config
files. Then, when proguarding the test apk's code, exclude those
libraries included in the tested apk, use the configs from the tested
apk, and apply the proguard mapping (the renames from obfuscation). Also
add some extra test-specific proguard options.
Now that the test apk does not bundle its own copy of all the tested
apk's classes, some things may need to be kept in the main apk just for
tests. However, we already keep everything in org.chromium.** and
com.google.android.apps.** because of the fact that the test apk was
using its own copy of all the classes and so we couldn't depend on the
tests to actually catch us from over-optimizing with proguard.
BUG=272790
Review URL: https://codereview.chromium.org/321883002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@277257 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-14 23:51:58 +04:00
|
|
|
'tested_apk_obfuscated_jar_path': '<(obfuscated_jar_path)',
|
2014-06-13 00:28:16 +04:00
|
|
|
'tested_apk_dex_path': '<(dex_path)',
|
2012-11-16 11:31:49 +04:00
|
|
|
},
|
|
|
|
},
|
2013-01-16 21:54:42 +04:00
|
|
|
'conditions': [
|
2013-03-26 21:35:21 +04:00
|
|
|
['resource_dir!=""', {
|
|
|
|
'variables': {
|
|
|
|
'resource_input_paths': [ '<!@(find <(resource_dir) -name "*")' ]
|
|
|
|
},
|
|
|
|
}],
|
2013-01-16 21:54:42 +04:00
|
|
|
['R_package != ""', {
|
|
|
|
'variables': {
|
|
|
|
# We generate R.java in package R_package (in addition to the package
|
|
|
|
# listed in the AndroidManifest.xml, which is unavoidable).
|
|
|
|
'additional_res_packages': ['<(R_package)'],
|
2014-09-05 14:42:05 +04:00
|
|
|
'additional_R_text_files': ['<(intermediate_dir)/R.txt'],
|
2013-01-16 21:54:42 +04:00
|
|
|
},
|
|
|
|
}],
|
2013-04-04 13:15:59 +04:00
|
|
|
['native_lib_target != "" and component == "shared_library"', {
|
2013-04-03 22:20:22 +04:00
|
|
|
'dependencies': [
|
|
|
|
'<(DEPTH)/build/android/setup.gyp:copy_system_libraries',
|
2013-04-11 04:26:25 +04:00
|
|
|
],
|
2013-04-03 22:20:22 +04:00
|
|
|
}],
|
2014-02-11 23:59:20 +04:00
|
|
|
['use_chromium_linker == 1', {
|
2013-10-22 01:40:44 +04:00
|
|
|
'dependencies': [
|
2014-02-10 20:19:22 +04:00
|
|
|
'<(DEPTH)/base/base.gyp:chromium_android_linker',
|
2013-10-22 01:40:44 +04:00
|
|
|
],
|
|
|
|
}],
|
2013-04-04 13:15:59 +04:00
|
|
|
['native_lib_target != ""', {
|
2013-04-02 03:12:33 +04:00
|
|
|
'variables': {
|
2014-10-07 18:18:04 +04:00
|
|
|
'conditions': [
|
|
|
|
['use_chromium_linker == 1', {
|
|
|
|
'variables': {
|
|
|
|
'chromium_linker_path': [
|
|
|
|
'<(SHARED_LIB_DIR)/<(libchromium_android_linker)',
|
|
|
|
],
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
'variables': {
|
|
|
|
'chromium_linker_path': [],
|
|
|
|
},
|
|
|
|
}],
|
|
|
|
],
|
2013-04-02 03:12:33 +04:00
|
|
|
'generated_src_dirs': [ '<(native_libraries_java_dir)' ],
|
2013-04-24 23:31:22 +04:00
|
|
|
'native_libs_paths': [
|
2014-10-07 18:18:04 +04:00
|
|
|
'<(SHARED_LIB_DIR)/<(native_lib_target).>(android_product_extension)',
|
|
|
|
'<@(chromium_linker_path)'
|
2013-04-24 23:31:22 +04:00
|
|
|
],
|
|
|
|
'package_input_paths': [
|
2014-04-10 17:42:46 +04:00
|
|
|
'<(apk_package_native_libs_dir)/<(android_app_abi)/gdbserver',
|
2013-04-24 23:31:22 +04:00
|
|
|
],
|
2013-04-02 03:12:33 +04:00
|
|
|
},
|
2013-04-24 23:31:22 +04:00
|
|
|
'copies': [
|
|
|
|
{
|
|
|
|
# gdbserver is always copied into the APK's native libs dir. The ant
|
|
|
|
# build scripts (apkbuilder task) will only include it in a debug
|
|
|
|
# build.
|
|
|
|
'destination': '<(apk_package_native_libs_dir)/<(android_app_abi)',
|
|
|
|
'files': [
|
|
|
|
'<(android_gdbserver)',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
2013-04-02 03:12:33 +04:00
|
|
|
'actions': [
|
|
|
|
{
|
2013-04-18 11:23:26 +04:00
|
|
|
'variables': {
|
2013-09-20 21:44:33 +04:00
|
|
|
'input_libraries': [
|
|
|
|
'<@(native_libs_paths)',
|
|
|
|
'<@(extra_native_libs)',
|
|
|
|
],
|
2013-04-18 11:23:26 +04:00
|
|
|
},
|
|
|
|
'includes': ['../build/android/write_ordered_libraries.gypi'],
|
2013-04-02 03:12:33 +04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'action_name': 'native_libraries_<(_target_name)',
|
2013-10-22 01:40:44 +04:00
|
|
|
'variables': {
|
|
|
|
'conditions': [
|
2014-02-11 23:59:20 +04:00
|
|
|
['use_chromium_linker == 1', {
|
2013-10-22 01:40:44 +04:00
|
|
|
'variables': {
|
|
|
|
'linker_gcc_preprocess_defines': [
|
2014-02-10 20:19:22 +04:00
|
|
|
'--defines', 'ENABLE_CHROMIUM_LINKER',
|
2013-10-22 01:40:44 +04:00
|
|
|
],
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
'variables': {
|
|
|
|
'linker_gcc_preprocess_defines': [],
|
|
|
|
},
|
|
|
|
}],
|
2014-06-27 20:59:46 +04:00
|
|
|
['load_library_from_zip_file == 1', {
|
|
|
|
'variables': {
|
|
|
|
'linker_load_from_zip_file_preprocess_defines': [
|
|
|
|
'--defines', 'ENABLE_CHROMIUM_LINKER_LIBRARY_IN_ZIP_FILE',
|
|
|
|
],
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
'variables': {
|
|
|
|
'linker_load_from_zip_file_preprocess_defines': [],
|
|
|
|
},
|
|
|
|
}],
|
2014-02-10 20:19:22 +04:00
|
|
|
['enable_chromium_linker_tests == 1', {
|
2013-10-22 01:40:44 +04:00
|
|
|
'variables': {
|
|
|
|
'linker_tests_gcc_preprocess_defines': [
|
2014-02-10 20:19:22 +04:00
|
|
|
'--defines', 'ENABLE_CHROMIUM_LINKER_TESTS',
|
2013-10-22 01:40:44 +04:00
|
|
|
],
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
'variables': {
|
|
|
|
'linker_tests_gcc_preprocess_defines': [],
|
|
|
|
},
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
'gcc_preprocess_defines': [
|
2014-06-27 20:59:46 +04:00
|
|
|
'<@(linker_load_from_zip_file_preprocess_defines)',
|
2013-10-22 01:40:44 +04:00
|
|
|
'<@(linker_gcc_preprocess_defines)',
|
|
|
|
'<@(linker_tests_gcc_preprocess_defines)',
|
|
|
|
],
|
|
|
|
},
|
2014-01-09 10:50:54 +04:00
|
|
|
'message': 'Creating NativeLibraries.java for <(_target_name)',
|
2013-04-02 03:12:33 +04:00
|
|
|
'inputs': [
|
2013-04-05 03:04:40 +04:00
|
|
|
'<(DEPTH)/build/android/gyp/util/build_utils.py',
|
|
|
|
'<(DEPTH)/build/android/gyp/gcc_preprocess.py',
|
2014-08-21 04:42:57 +04:00
|
|
|
'<(ordered_libraries_file)',
|
2013-04-02 03:12:33 +04:00
|
|
|
'<(native_libraries_template)',
|
|
|
|
],
|
|
|
|
'outputs': [
|
|
|
|
'<(native_libraries_java_stamp)',
|
|
|
|
],
|
|
|
|
'action': [
|
2013-04-05 03:04:40 +04:00
|
|
|
'python', '<(DEPTH)/build/android/gyp/gcc_preprocess.py',
|
2014-08-21 04:42:57 +04:00
|
|
|
'--include-path=',
|
2013-04-02 03:12:33 +04:00
|
|
|
'--output=<(native_libraries_java_file)',
|
|
|
|
'--template=<(native_libraries_template)',
|
|
|
|
'--stamp=<(native_libraries_java_stamp)',
|
2014-08-21 04:42:57 +04:00
|
|
|
'--defines', 'NATIVE_LIBRARIES_LIST=@FileArg(<(ordered_libraries_file):java_libraries_list)',
|
|
|
|
'--defines', 'NATIVE_LIBRARIES_VERSION_NUMBER="<(native_lib_version_name)"',
|
2013-10-22 01:40:44 +04:00
|
|
|
'<@(gcc_preprocess_defines)',
|
2013-04-02 03:12:33 +04:00
|
|
|
],
|
|
|
|
},
|
2013-04-02 07:23:14 +04:00
|
|
|
{
|
2013-05-16 06:40:29 +04:00
|
|
|
'action_name': 'strip_native_libraries',
|
2013-04-18 11:23:26 +04:00
|
|
|
'variables': {
|
2013-05-16 06:40:29 +04:00
|
|
|
'ordered_libraries_file%': '<(ordered_libraries_file)',
|
2014-07-04 23:58:34 +04:00
|
|
|
'stripped_libraries_dir%': '<(stripped_libraries_dir)',
|
2013-09-20 21:44:33 +04:00
|
|
|
'input_paths': [
|
|
|
|
'<@(native_libs_paths)',
|
|
|
|
'<@(extra_native_libs)',
|
|
|
|
],
|
2013-05-16 06:40:29 +04:00
|
|
|
'stamp': '<(strip_stamp)'
|
2013-04-18 11:23:26 +04:00
|
|
|
},
|
|
|
|
'includes': ['../build/android/strip_native_libraries.gypi'],
|
2013-04-02 07:23:14 +04:00
|
|
|
},
|
2014-10-06 18:36:01 +04:00
|
|
|
{
|
|
|
|
'action_name': 'insert_chromium_version',
|
|
|
|
'variables': {
|
|
|
|
'ordered_libraries_file%': '<(ordered_libraries_file)',
|
|
|
|
'stripped_libraries_dir%': '<(stripped_libraries_dir)',
|
|
|
|
'version_string': '<(native_lib_version_name)',
|
|
|
|
'input_paths': [
|
|
|
|
'<(strip_stamp)',
|
|
|
|
],
|
|
|
|
'stamp': '<(version_stamp)'
|
|
|
|
},
|
|
|
|
'includes': ['../build/android/insert_chromium_version.gypi'],
|
|
|
|
},
|
2014-07-04 23:58:34 +04:00
|
|
|
{
|
|
|
|
'action_name': 'pack_arm_relocations',
|
|
|
|
'variables': {
|
|
|
|
'conditions': [
|
2014-10-10 22:54:14 +04:00
|
|
|
['use_chromium_linker == 1 and use_relocation_packer == 1 and profiling != 1', {
|
2014-07-04 23:58:34 +04:00
|
|
|
'enable_packing': 1,
|
|
|
|
}, {
|
|
|
|
'enable_packing': 0,
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
'exclude_packing_list': [
|
|
|
|
'<(libchromium_android_linker)',
|
|
|
|
],
|
|
|
|
'ordered_libraries_file%': '<(ordered_libraries_file)',
|
|
|
|
'stripped_libraries_dir%': '<(stripped_libraries_dir)',
|
|
|
|
'packed_libraries_dir': '<(libraries_source_dir)',
|
|
|
|
'input_paths': [
|
2014-10-06 18:36:01 +04:00
|
|
|
'<(version_stamp)'
|
2014-07-04 23:58:34 +04:00
|
|
|
],
|
|
|
|
'stamp': '<(pack_arm_relocations_stamp)',
|
|
|
|
},
|
|
|
|
'includes': ['../build/android/pack_arm_relocations.gypi'],
|
|
|
|
},
|
2014-07-09 17:06:44 +04:00
|
|
|
{
|
|
|
|
'variables': {
|
|
|
|
'input_libraries': [
|
|
|
|
'<@(additional_bundled_libs)',
|
|
|
|
],
|
|
|
|
'ordered_libraries_file': '<(additional_ordered_libraries_file)',
|
|
|
|
'subtarget': '_additional_libraries',
|
|
|
|
},
|
|
|
|
'includes': ['../build/android/write_ordered_libraries.gypi'],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'action_name': 'strip_additional_libraries',
|
|
|
|
'variables': {
|
|
|
|
'ordered_libraries_file': '<(additional_ordered_libraries_file)',
|
2014-07-16 05:11:11 +04:00
|
|
|
'stripped_libraries_dir': '<(libraries_source_dir)',
|
2014-07-09 17:06:44 +04:00
|
|
|
'input_paths': [
|
|
|
|
'<@(additional_bundled_libs)',
|
|
|
|
'<(strip_stamp)',
|
|
|
|
],
|
|
|
|
'stamp': '<(strip_additional_stamp)'
|
|
|
|
},
|
|
|
|
'includes': ['../build/android/strip_native_libraries.gypi'],
|
|
|
|
},
|
2014-09-18 07:57:26 +04:00
|
|
|
{
|
|
|
|
'action_name': 'Create native lib placeholder files for previous releases',
|
|
|
|
'variables': {
|
|
|
|
'placeholders': ['<@(native_lib_placeholders)'],
|
|
|
|
'conditions': [
|
|
|
|
['gyp_managed_install == 1', {
|
|
|
|
# This "library" just needs to be put in the .apk. It is not loaded
|
|
|
|
# at runtime.
|
|
|
|
'placeholders': ['libfix.crbug.384638.so'],
|
|
|
|
}]
|
|
|
|
],
|
|
|
|
},
|
|
|
|
'inputs': [
|
|
|
|
'<(DEPTH)/build/android/gyp/create_placeholder_files.py',
|
|
|
|
],
|
|
|
|
'outputs': [
|
|
|
|
'<(native_lib_placeholder_stamp)',
|
|
|
|
],
|
|
|
|
'action': [
|
|
|
|
'python', '<(DEPTH)/build/android/gyp/create_placeholder_files.py',
|
|
|
|
'--dest-lib-dir=<(apk_package_native_libs_dir)/<(android_app_abi)/',
|
|
|
|
'--stamp=<(native_lib_placeholder_stamp)',
|
|
|
|
'<@(placeholders)',
|
|
|
|
],
|
|
|
|
},
|
2013-04-02 03:12:33 +04:00
|
|
|
],
|
2013-04-03 00:36:13 +04:00
|
|
|
'conditions': [
|
|
|
|
['gyp_managed_install == 1', {
|
|
|
|
'variables': {
|
2013-06-25 22:42:07 +04:00
|
|
|
'libraries_top_dir': '<(intermediate_dir)/lib.stripped',
|
|
|
|
'libraries_source_dir': '<(libraries_top_dir)/lib/<(android_app_abi)',
|
2013-04-23 22:30:26 +04:00
|
|
|
'device_library_dir': '<(device_intermediate_dir)/lib.stripped',
|
2013-09-10 05:39:25 +04:00
|
|
|
'configuration_name': '<(CONFIGURATION_NAME)',
|
2013-04-03 00:36:13 +04:00
|
|
|
},
|
|
|
|
'dependencies': [
|
[Android] Add an action to check/record attached devices
When doing a gyp_managed_install, we install APKs to the attached
device. Currently this can fail in many ways (no device attached,
multiple devices attached, device offline, device doesn't have root,
etc.). In addition, we need to detect changes to the attached device
(particularly when the device is switched, when an APK is
uninstalled/updated).
The current approach is to check all this information in the action
interacting with the device. This means that when there is some
problem we print the same warning messages for every APK that is built,
and, in some cases, multiple times for each APK. Also, we have to run
every install/push action every build because we detect changes to the
attached device in that action.
This change creates a new build action, "get device configurations".
This action inspects the attached devices, filters out offline devices,
filters out devices without root, and then writes a configuration
file with the id+metadata for the first non-filtered device. This
configuration is then used by each of the build steps that interacts
with the device. This consolidates all the device checking to a single
place, and the build actions don't need to do any checking. In
addition, to detect changes in the attached device, we only need to run
this single action every build and the install/push actions will only
change when the device/metadata changes.
Also, with this change we can now gracefully handle the case where
multiple devices are attached (currently just write the configuration
for the first valid device and install to that one).
Review URL: https://chromiumcodereview.appspot.com/16831013
git-svn-id: http://src.chromium.org/svn/trunk/src/build@209582 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-02 05:52:33 +04:00
|
|
|
'<(DEPTH)/build/android/setup.gyp:get_build_device_configurations',
|
2014-10-15 12:24:13 +04:00
|
|
|
'<(DEPTH)/build/android/pylib/device/commands/commands.gyp:chromium_commands',
|
2013-04-03 00:36:13 +04:00
|
|
|
],
|
|
|
|
'actions': [
|
|
|
|
{
|
2013-04-18 11:23:26 +04:00
|
|
|
'includes': ['../build/android/push_libraries.gypi'],
|
2013-04-03 00:36:13 +04:00
|
|
|
},
|
|
|
|
{
|
2013-04-19 13:16:13 +04:00
|
|
|
'action_name': 'create device library symlinks',
|
2014-01-09 10:50:54 +04:00
|
|
|
'message': 'Creating links on device for <(_target_name)',
|
2013-04-03 00:36:13 +04:00
|
|
|
'inputs': [
|
2013-04-19 13:16:13 +04:00
|
|
|
'<(DEPTH)/build/android/gyp/util/build_utils.py',
|
2013-04-03 00:36:13 +04:00
|
|
|
'<(DEPTH)/build/android/gyp/create_device_library_links.py',
|
2013-04-19 13:16:13 +04:00
|
|
|
'<(apk_install_record)',
|
[Android] Add an action to check/record attached devices
When doing a gyp_managed_install, we install APKs to the attached
device. Currently this can fail in many ways (no device attached,
multiple devices attached, device offline, device doesn't have root,
etc.). In addition, we need to detect changes to the attached device
(particularly when the device is switched, when an APK is
uninstalled/updated).
The current approach is to check all this information in the action
interacting with the device. This means that when there is some
problem we print the same warning messages for every APK that is built,
and, in some cases, multiple times for each APK. Also, we have to run
every install/push action every build because we detect changes to the
attached device in that action.
This change creates a new build action, "get device configurations".
This action inspects the attached devices, filters out offline devices,
filters out devices without root, and then writes a configuration
file with the id+metadata for the first non-filtered device. This
configuration is then used by each of the build steps that interacts
with the device. This consolidates all the device checking to a single
place, and the build actions don't need to do any checking. In
addition, to detect changes in the attached device, we only need to run
this single action every build and the install/push actions will only
change when the device/metadata changes.
Also, with this change we can now gracefully handle the case where
multiple devices are attached (currently just write the configuration
for the first valid device and install to that one).
Review URL: https://chromiumcodereview.appspot.com/16831013
git-svn-id: http://src.chromium.org/svn/trunk/src/build@209582 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-02 05:52:33 +04:00
|
|
|
'<(build_device_config_path)',
|
2013-04-19 13:16:13 +04:00
|
|
|
'<(ordered_libraries_file)',
|
2013-04-03 00:36:13 +04:00
|
|
|
],
|
|
|
|
'outputs': [
|
|
|
|
'<(link_stamp)'
|
|
|
|
],
|
|
|
|
'action': [
|
|
|
|
'python', '<(DEPTH)/build/android/gyp/create_device_library_links.py',
|
[Android] Add an action to check/record attached devices
When doing a gyp_managed_install, we install APKs to the attached
device. Currently this can fail in many ways (no device attached,
multiple devices attached, device offline, device doesn't have root,
etc.). In addition, we need to detect changes to the attached device
(particularly when the device is switched, when an APK is
uninstalled/updated).
The current approach is to check all this information in the action
interacting with the device. This means that when there is some
problem we print the same warning messages for every APK that is built,
and, in some cases, multiple times for each APK. Also, we have to run
every install/push action every build because we detect changes to the
attached device in that action.
This change creates a new build action, "get device configurations".
This action inspects the attached devices, filters out offline devices,
filters out devices without root, and then writes a configuration
file with the id+metadata for the first non-filtered device. This
configuration is then used by each of the build steps that interacts
with the device. This consolidates all the device checking to a single
place, and the build actions don't need to do any checking. In
addition, to detect changes in the attached device, we only need to run
this single action every build and the install/push actions will only
change when the device/metadata changes.
Also, with this change we can now gracefully handle the case where
multiple devices are attached (currently just write the configuration
for the first valid device and install to that one).
Review URL: https://chromiumcodereview.appspot.com/16831013
git-svn-id: http://src.chromium.org/svn/trunk/src/build@209582 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-02 05:52:33 +04:00
|
|
|
'--build-device-configuration=<(build_device_config_path)',
|
2014-08-21 04:42:57 +04:00
|
|
|
'--libraries=@FileArg(<(ordered_libraries_file):libraries)',
|
2013-04-19 13:16:13 +04:00
|
|
|
'--script-host-path=<(symlink_script_host_path)',
|
|
|
|
'--script-device-path=<(symlink_script_device_path)',
|
2013-04-03 00:36:13 +04:00
|
|
|
'--target-dir=<(device_library_dir)',
|
2013-06-25 22:42:07 +04:00
|
|
|
'--apk=<(incomplete_apk_path)',
|
2013-04-03 00:36:13 +04:00
|
|
|
'--stamp=<(link_stamp)',
|
2013-09-10 05:39:25 +04:00
|
|
|
'--configuration-name=<(CONFIGURATION_NAME)',
|
2013-04-03 00:36:13 +04:00
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
2013-06-25 22:42:07 +04:00
|
|
|
'conditions': [
|
|
|
|
['create_standalone_apk == 1', {
|
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'create standalone APK',
|
|
|
|
'variables': {
|
|
|
|
'inputs': [
|
|
|
|
'<(ordered_libraries_file)',
|
2014-07-09 17:06:44 +04:00
|
|
|
'<(strip_additional_stamp)',
|
2014-10-06 18:36:01 +04:00
|
|
|
'<(pack_arm_relocations_stamp)',
|
2013-06-25 22:42:07 +04:00
|
|
|
],
|
|
|
|
'output_apk_path': '<(unsigned_standalone_apk_path)',
|
|
|
|
'libraries_top_dir%': '<(libraries_top_dir)',
|
2015-05-19 19:58:32 +03:00
|
|
|
'input_apk_path': '<(managed_input_apk_path)',
|
2013-06-25 22:42:07 +04:00
|
|
|
},
|
|
|
|
'includes': [ 'android/create_standalone_apk_action.gypi' ],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
2013-04-03 00:36:13 +04:00
|
|
|
}, {
|
2013-04-05 07:41:57 +04:00
|
|
|
# gyp_managed_install != 1
|
2013-04-03 00:36:13 +04:00
|
|
|
'variables': {
|
2013-04-18 11:23:26 +04:00
|
|
|
'libraries_source_dir': '<(apk_package_native_libs_dir)/<(android_app_abi)',
|
2014-07-09 17:06:44 +04:00
|
|
|
'package_input_paths': [
|
|
|
|
'<(strip_additional_stamp)',
|
2014-10-06 18:36:01 +04:00
|
|
|
'<(pack_arm_relocations_stamp)',
|
2014-07-09 17:06:44 +04:00
|
|
|
],
|
2013-04-03 00:36:13 +04:00
|
|
|
},
|
|
|
|
}],
|
|
|
|
],
|
2013-04-04 13:15:59 +04:00
|
|
|
}], # native_lib_target != ''
|
2015-05-19 19:58:32 +03:00
|
|
|
['gyp_managed_install == 0 or create_standalone_apk == 1 or create_abi_split == 1', {
|
|
|
|
'dependencies': [
|
|
|
|
'<(DEPTH)/build/android/rezip.gyp:rezip_apk_jar',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
['create_abi_split == 1 or gyp_managed_install == 0 or create_standalone_apk == 1', {
|
2013-06-25 22:42:07 +04:00
|
|
|
'actions': [
|
|
|
|
{
|
2015-05-19 19:58:32 +03:00
|
|
|
'action_name': 'finalize_base',
|
2013-06-25 22:42:07 +04:00
|
|
|
'variables': {
|
|
|
|
'output_apk_path': '<(final_apk_path)',
|
2015-05-19 19:58:32 +03:00
|
|
|
'conditions': [
|
|
|
|
['create_abi_split == 0', {
|
|
|
|
'input_apk_path': '<(unsigned_standalone_apk_path)',
|
|
|
|
'load_library_from_zip': '<(load_library_from_zip_file)',
|
|
|
|
}, {
|
|
|
|
'input_apk_path': '<(unsigned_apk_path)',
|
|
|
|
'load_library_from_zip': 0,
|
|
|
|
}]
|
|
|
|
],
|
2013-06-25 22:42:07 +04:00
|
|
|
},
|
|
|
|
'includes': [ 'android/finalize_apk_action.gypi']
|
|
|
|
},
|
|
|
|
],
|
2015-05-19 19:58:32 +03:00
|
|
|
}],
|
|
|
|
['create_abi_split == 1', {
|
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'generate_split_manifest_<(_target_name)',
|
|
|
|
'inputs': [
|
|
|
|
'<(DEPTH)/build/android/gyp/util/build_utils.py',
|
|
|
|
'<(DEPTH)/build/android/gyp/generate_split_manifest.py',
|
|
|
|
'<(android_manifest_path)',
|
|
|
|
],
|
|
|
|
'outputs': [
|
|
|
|
'<(split_android_manifest_path)',
|
|
|
|
],
|
|
|
|
'action': [
|
|
|
|
'python', '<(DEPTH)/build/android/gyp/generate_split_manifest.py',
|
|
|
|
'--main-manifest', '<(android_manifest_path)',
|
|
|
|
'--out-manifest', '<(split_android_manifest_path)',
|
|
|
|
'--split', 'abi_<(android_app_abi)',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'variables': {
|
|
|
|
'apk_name': '<(main_apk_name)-abi-<(android_app_abi)',
|
|
|
|
'asset_location': '',
|
|
|
|
'android_manifest_path': '<(split_android_manifest_path)',
|
|
|
|
},
|
|
|
|
'includes': [ 'android/package_resources_action.gypi' ],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'variables': {
|
|
|
|
'apk_name': '<(main_apk_name)-abi-<(android_app_abi)',
|
|
|
|
'apk_path': '<(unsigned_abi_split_apk_path)',
|
|
|
|
'has_code': 0,
|
|
|
|
'native_libs_dir': '<(apk_package_native_libs_dir)',
|
|
|
|
'extra_inputs': ['<(native_lib_placeholder_stamp)'],
|
|
|
|
},
|
|
|
|
'includes': ['android/apkbuilder_action.gypi'],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
['create_abi_split == 1 and (gyp_managed_install == 0 or create_standalone_apk == 1)', {
|
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'finalize_split',
|
|
|
|
'variables': {
|
|
|
|
'load_library_from_zip': '<(load_library_from_zip_file)',
|
|
|
|
'output_apk_path': '<(final_abi_split_apk_path)',
|
|
|
|
'conditions': [
|
|
|
|
['gyp_managed_install == 1', {
|
|
|
|
'input_apk_path': '<(unsigned_standalone_apk_path)',
|
|
|
|
}, {
|
|
|
|
'input_apk_path': '<(unsigned_abi_split_apk_path)',
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
'includes': [ 'android/finalize_apk_action.gypi']
|
|
|
|
},
|
2014-06-27 20:59:46 +04:00
|
|
|
],
|
2013-06-25 22:42:07 +04:00
|
|
|
}],
|
2013-04-02 20:55:46 +04:00
|
|
|
['gyp_managed_install == 1', {
|
|
|
|
'actions': [
|
2013-06-25 22:42:07 +04:00
|
|
|
{
|
|
|
|
'action_name': 'finalize incomplete apk',
|
|
|
|
'variables': {
|
2015-05-19 19:58:32 +03:00
|
|
|
'load_library_from_zip': 0,
|
|
|
|
'input_apk_path': '<(managed_input_apk_path)',
|
2013-06-25 22:42:07 +04:00
|
|
|
'output_apk_path': '<(incomplete_apk_path)',
|
|
|
|
},
|
|
|
|
'includes': [ 'android/finalize_apk_action.gypi']
|
|
|
|
},
|
2013-04-02 20:55:46 +04:00
|
|
|
{
|
|
|
|
'action_name': 'apk_install_<(_target_name)',
|
|
|
|
'message': 'Installing <(apk_name).apk',
|
|
|
|
'inputs': [
|
2013-04-05 03:04:40 +04:00
|
|
|
'<(DEPTH)/build/android/gyp/util/build_utils.py',
|
2013-04-02 20:55:46 +04:00
|
|
|
'<(DEPTH)/build/android/gyp/apk_install.py',
|
[Android] Add an action to check/record attached devices
When doing a gyp_managed_install, we install APKs to the attached
device. Currently this can fail in many ways (no device attached,
multiple devices attached, device offline, device doesn't have root,
etc.). In addition, we need to detect changes to the attached device
(particularly when the device is switched, when an APK is
uninstalled/updated).
The current approach is to check all this information in the action
interacting with the device. This means that when there is some
problem we print the same warning messages for every APK that is built,
and, in some cases, multiple times for each APK. Also, we have to run
every install/push action every build because we detect changes to the
attached device in that action.
This change creates a new build action, "get device configurations".
This action inspects the attached devices, filters out offline devices,
filters out devices without root, and then writes a configuration
file with the id+metadata for the first non-filtered device. This
configuration is then used by each of the build steps that interacts
with the device. This consolidates all the device checking to a single
place, and the build actions don't need to do any checking. In
addition, to detect changes in the attached device, we only need to run
this single action every build and the install/push actions will only
change when the device/metadata changes.
Also, with this change we can now gracefully handle the case where
multiple devices are attached (currently just write the configuration
for the first valid device and install to that one).
Review URL: https://chromiumcodereview.appspot.com/16831013
git-svn-id: http://src.chromium.org/svn/trunk/src/build@209582 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-02 05:52:33 +04:00
|
|
|
'<(build_device_config_path)',
|
2013-06-25 22:42:07 +04:00
|
|
|
'<(incomplete_apk_path)',
|
2013-04-02 20:55:46 +04:00
|
|
|
],
|
|
|
|
'outputs': [
|
2013-04-19 13:16:13 +04:00
|
|
|
'<(apk_install_record)',
|
2013-04-02 20:55:46 +04:00
|
|
|
],
|
|
|
|
'action': [
|
|
|
|
'python', '<(DEPTH)/build/android/gyp/apk_install.py',
|
[Android] Add an action to check/record attached devices
When doing a gyp_managed_install, we install APKs to the attached
device. Currently this can fail in many ways (no device attached,
multiple devices attached, device offline, device doesn't have root,
etc.). In addition, we need to detect changes to the attached device
(particularly when the device is switched, when an APK is
uninstalled/updated).
The current approach is to check all this information in the action
interacting with the device. This means that when there is some
problem we print the same warning messages for every APK that is built,
and, in some cases, multiple times for each APK. Also, we have to run
every install/push action every build because we detect changes to the
attached device in that action.
This change creates a new build action, "get device configurations".
This action inspects the attached devices, filters out offline devices,
filters out devices without root, and then writes a configuration
file with the id+metadata for the first non-filtered device. This
configuration is then used by each of the build steps that interacts
with the device. This consolidates all the device checking to a single
place, and the build actions don't need to do any checking. In
addition, to detect changes in the attached device, we only need to run
this single action every build and the install/push actions will only
change when the device/metadata changes.
Also, with this change we can now gracefully handle the case where
multiple devices are attached (currently just write the configuration
for the first valid device and install to that one).
Review URL: https://chromiumcodereview.appspot.com/16831013
git-svn-id: http://src.chromium.org/svn/trunk/src/build@209582 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-02 05:52:33 +04:00
|
|
|
'--build-device-configuration=<(build_device_config_path)',
|
|
|
|
'--install-record=<(apk_install_record)',
|
2013-09-10 05:39:25 +04:00
|
|
|
'--configuration-name=<(CONFIGURATION_NAME)',
|
2013-04-02 20:55:46 +04:00
|
|
|
],
|
2015-05-19 19:58:32 +03:00
|
|
|
'conditions': [
|
|
|
|
['create_abi_split == 1', {
|
|
|
|
'inputs': [
|
|
|
|
'<(final_apk_path)',
|
|
|
|
],
|
|
|
|
'action': [
|
|
|
|
'--apk-path=<(final_apk_path)',
|
|
|
|
'--split-apk-path=<(incomplete_apk_path)',
|
|
|
|
],
|
|
|
|
}, {
|
|
|
|
'action': [
|
|
|
|
'--apk-path=<(incomplete_apk_path)',
|
|
|
|
],
|
|
|
|
}]
|
|
|
|
],
|
2013-04-02 20:55:46 +04:00
|
|
|
},
|
|
|
|
],
|
|
|
|
}],
|
2013-08-14 03:46:39 +04:00
|
|
|
['is_test_apk == 1', {
|
|
|
|
'dependencies': [
|
2014-10-13 15:39:48 +04:00
|
|
|
'<(DEPTH)/build/android/pylib/device/commands/commands.gyp:chromium_commands',
|
2013-08-14 03:46:39 +04:00
|
|
|
'<(DEPTH)/tools/android/android_tools.gyp:android_tools',
|
|
|
|
]
|
|
|
|
}],
|
2015-03-24 06:14:39 +03:00
|
|
|
['run_findbugs == 1', {
|
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'findbugs_<(_target_name)',
|
|
|
|
'message': 'Running findbugs on <(_target_name)',
|
|
|
|
'inputs': [
|
|
|
|
'<(DEPTH)/build/android/findbugs_diff.py',
|
|
|
|
'<(DEPTH)/build/android/findbugs_filter/findbugs_exclude.xml',
|
|
|
|
'<(DEPTH)/build/android/pylib/utils/findbugs.py',
|
|
|
|
'>@(input_jars_paths)',
|
|
|
|
'<(jar_path)',
|
|
|
|
'<(compile_stamp)',
|
|
|
|
],
|
|
|
|
'outputs': [
|
|
|
|
'<(findbugs_stamp)',
|
|
|
|
],
|
|
|
|
'action': [
|
|
|
|
'python', '<(DEPTH)/build/android/findbugs_diff.py',
|
|
|
|
'--auxclasspath-gyp', '>(input_jars_paths)',
|
|
|
|
'--stamp', '<(findbugs_stamp)',
|
|
|
|
'<(jar_path)',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
]
|
2013-01-16 21:54:42 +04:00
|
|
|
],
|
2013-09-19 20:33:08 +04:00
|
|
|
'dependencies': [
|
|
|
|
'<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum',
|
|
|
|
],
|
2012-09-19 08:16:27 +04:00
|
|
|
'actions': [
|
|
|
|
{
|
2014-05-27 09:42:45 +04:00
|
|
|
'action_name': 'process_resources',
|
|
|
|
'message': 'processing resources for <(_target_name)',
|
|
|
|
'variables': {
|
|
|
|
# Write the inputs list to a file, so that its mtime is updated when
|
|
|
|
# the list of inputs changes.
|
|
|
|
'inputs_list_file': '>|(apk_codegen.<(_target_name).gypcmd >@(additional_input_paths) >@(resource_input_paths))',
|
2014-06-07 12:28:03 +04:00
|
|
|
'process_resources_options': [],
|
|
|
|
'conditions': [
|
|
|
|
['is_test_apk == 1', {
|
2014-06-11 05:20:55 +04:00
|
|
|
'dependencies_res_zip_paths=': [],
|
2013-03-26 21:35:21 +04:00
|
|
|
'additional_res_packages=': [],
|
2014-06-07 12:28:03 +04:00
|
|
|
}],
|
2015-05-15 01:17:59 +03:00
|
|
|
['res_v14_skip == 1', {
|
|
|
|
'process_resources_options+': ['--v14-skip']
|
|
|
|
}],
|
2014-11-08 05:08:39 +03:00
|
|
|
['shared_resources == 1', {
|
|
|
|
'process_resources_options+': ['--shared-resources']
|
2014-06-07 12:28:03 +04:00
|
|
|
}],
|
2015-05-11 22:11:29 +03:00
|
|
|
['R_package != ""', {
|
|
|
|
'process_resources_options+': ['--custom-package', '<(R_package)']
|
|
|
|
}],
|
|
|
|
['include_all_resources == 1', {
|
|
|
|
'process_resources_options+': ['--include-all-resources']
|
|
|
|
}]
|
2014-06-07 12:28:03 +04:00
|
|
|
],
|
|
|
|
},
|
2013-03-26 21:35:21 +04:00
|
|
|
'inputs': [
|
2013-04-05 07:41:57 +04:00
|
|
|
'<(DEPTH)/build/android/gyp/util/build_utils.py',
|
2014-05-27 09:42:45 +04:00
|
|
|
'<(DEPTH)/build/android/gyp/process_resources.py',
|
2013-04-06 04:14:39 +04:00
|
|
|
'<(android_manifest_path)',
|
2013-03-26 21:35:21 +04:00
|
|
|
'>@(additional_input_paths)',
|
2013-04-11 03:10:17 +04:00
|
|
|
'>@(resource_input_paths)',
|
2014-06-11 05:20:55 +04:00
|
|
|
'>@(dependencies_res_zip_paths)',
|
2014-03-21 03:22:44 +04:00
|
|
|
'>(inputs_list_file)',
|
2013-03-26 21:35:21 +04:00
|
|
|
],
|
|
|
|
'outputs': [
|
2014-06-11 05:20:55 +04:00
|
|
|
'<(resource_zip_path)',
|
2014-05-27 09:42:45 +04:00
|
|
|
'<(generated_proguard_file)',
|
2013-03-26 21:35:21 +04:00
|
|
|
'<(codegen_stamp)',
|
|
|
|
],
|
|
|
|
'action': [
|
2014-05-27 09:42:45 +04:00
|
|
|
'python', '<(DEPTH)/build/android/gyp/process_resources.py',
|
|
|
|
'--android-sdk', '<(android_sdk)',
|
|
|
|
'--android-sdk-tools', '<(android_sdk_tools)',
|
|
|
|
|
|
|
|
'--android-manifest', '<(android_manifest_path)',
|
2014-06-11 05:20:55 +04:00
|
|
|
'--dependencies-res-zips', '>(dependencies_res_zip_paths)',
|
2014-05-27 09:42:45 +04:00
|
|
|
|
|
|
|
'--extra-res-packages', '>(additional_res_packages)',
|
|
|
|
'--extra-r-text-files', '>(additional_R_text_files)',
|
|
|
|
|
|
|
|
'--proguard-file', '<(generated_proguard_file)',
|
|
|
|
|
2014-07-01 05:45:03 +04:00
|
|
|
'--resource-dirs', '<(resource_dir)',
|
2014-06-11 05:20:55 +04:00
|
|
|
'--resource-zip-out', '<(resource_zip_path)',
|
2014-05-27 09:42:45 +04:00
|
|
|
|
|
|
|
'--R-dir', '<(intermediate_dir)/gen',
|
2013-03-26 21:35:21 +04:00
|
|
|
|
2014-05-27 09:42:45 +04:00
|
|
|
'--stamp', '<(codegen_stamp)',
|
2014-06-07 12:28:03 +04:00
|
|
|
|
|
|
|
'<@(process_resources_options)',
|
2013-03-26 21:35:21 +04:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
2013-03-27 00:44:29 +04:00
|
|
|
'action_name': 'javac_<(_target_name)',
|
2013-03-26 21:35:21 +04:00
|
|
|
'message': 'Compiling java for <(_target_name)',
|
2013-03-27 00:44:29 +04:00
|
|
|
'variables': {
|
android: Pass (non-generated) .java files via a gyp filelist to javac.py
Before this CL, the javac action rules called `find javadir -name "*.java"` to
compute the action's inputs, and passed javadir to javac.py. The script then
again looked for all .java files in that directory. One issue with that approach
is that if a java file gets removed, the javac.py action didn't get executed again
since actions are only run if their commandline changes or an input file is newer
than an output file – a disappearing input doesn't mark an action dirty. (As
workaround, the md5 hash of all .java files is currently passed in an
--ignore parameter, so removal of a java file will lead to a changing
commandline, which _will_ cause a rebuild.)
After this CL, the result of `find javadir -name "*.java"` is written to a gyp
filelist (see https://codereview.chromium.org/27418008/), and the filelist
is passed to javac.py. gyp writes filelists exactly if their contents would
change, so removal of java file will change the mtime of the filelist, which will
cause a rebuild. Another advantage is that the list of java files is computed in
only one place.
This CL doesn't yet remove the md5 hack, but it makes it possible to do so
in a follow-up change.
(This approach doesn't work for generated java files, because these might
not yet exist at gyp time. Rename --src-dirs to --src-gendirs and keep it in
use for generated files. The dependency handling of generated java files is
done through stamp files, so the md5 hack isn't needed for them.)
No intended behavior change.
BUG=177552
R=cjhopman@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256097
Review URL: https://codereview.chromium.org/193693002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@256667 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-13 01:56:41 +04:00
|
|
|
'gen_src_dirs': [
|
2013-03-27 00:44:29 +04:00
|
|
|
'<(intermediate_dir)/gen',
|
|
|
|
'>@(generated_src_dirs)',
|
|
|
|
],
|
android: Pass (non-generated) .java files via a gyp filelist to javac.py
Before this CL, the javac action rules called `find javadir -name "*.java"` to
compute the action's inputs, and passed javadir to javac.py. The script then
again looked for all .java files in that directory. One issue with that approach
is that if a java file gets removed, the javac.py action didn't get executed again
since actions are only run if their commandline changes or an input file is newer
than an output file – a disappearing input doesn't mark an action dirty. (As
workaround, the md5 hash of all .java files is currently passed in an
--ignore parameter, so removal of a java file will lead to a changing
commandline, which _will_ cause a rebuild.)
After this CL, the result of `find javadir -name "*.java"` is written to a gyp
filelist (see https://codereview.chromium.org/27418008/), and the filelist
is passed to javac.py. gyp writes filelists exactly if their contents would
change, so removal of java file will change the mtime of the filelist, which will
cause a rebuild. Another advantage is that the list of java files is computed in
only one place.
This CL doesn't yet remove the md5 hack, but it makes it possible to do so
in a follow-up change.
(This approach doesn't work for generated java files, because these might
not yet exist at gyp time. Rename --src-dirs to --src-gendirs and keep it in
use for generated files. The dependency handling of generated java files is
done through stamp files, so the md5 hack isn't needed for them.)
No intended behavior change.
BUG=177552
R=cjhopman@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256097
Review URL: https://codereview.chromium.org/193693002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@256667 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-13 01:56:41 +04:00
|
|
|
# If there is a separate find for additional_src_dirs, it will find the
|
|
|
|
# wrong .java files when additional_src_dirs is empty.
|
|
|
|
# TODO(thakis): Gyp caches >! evaluation by command. Both java.gypi and
|
|
|
|
# java_apk.gypi evaluate the same command, and at the moment two targets
|
|
|
|
# set java_in_dir to "java". Add a dummy comment here to make sure
|
|
|
|
# that the two targets (one uses java.gypi, the other java_apk.gypi)
|
|
|
|
# get distinct source lists. Medium-term, make targets list all their
|
|
|
|
# Java files instead of using find. (As is, this will be broken if two
|
|
|
|
# targets use the same java_in_dir and both use java_apk.gypi or
|
|
|
|
# both use java.gypi.)
|
2014-09-09 15:44:02 +04:00
|
|
|
'java_sources': ['>!@(find >(java_in_dir)>(java_in_dir_suffix) >(additional_src_dirs) -name "*.java" # apk)'],
|
android: Pass (non-generated) .java files via a gyp filelist to javac.py
Before this CL, the javac action rules called `find javadir -name "*.java"` to
compute the action's inputs, and passed javadir to javac.py. The script then
again looked for all .java files in that directory. One issue with that approach
is that if a java file gets removed, the javac.py action didn't get executed again
since actions are only run if their commandline changes or an input file is newer
than an output file – a disappearing input doesn't mark an action dirty. (As
workaround, the md5 hash of all .java files is currently passed in an
--ignore parameter, so removal of a java file will lead to a changing
commandline, which _will_ cause a rebuild.)
After this CL, the result of `find javadir -name "*.java"` is written to a gyp
filelist (see https://codereview.chromium.org/27418008/), and the filelist
is passed to javac.py. gyp writes filelists exactly if their contents would
change, so removal of java file will change the mtime of the filelist, which will
cause a rebuild. Another advantage is that the list of java files is computed in
only one place.
This CL doesn't yet remove the md5 hack, but it makes it possible to do so
in a follow-up change.
(This approach doesn't work for generated java files, because these might
not yet exist at gyp time. Rename --src-dirs to --src-gendirs and keep it in
use for generated files. The dependency handling of generated java files is
done through stamp files, so the md5 hack isn't needed for them.)
No intended behavior change.
BUG=177552
R=cjhopman@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256097
Review URL: https://codereview.chromium.org/193693002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@256667 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-13 01:56:41 +04:00
|
|
|
|
2013-03-27 00:44:29 +04:00
|
|
|
},
|
2012-09-19 08:16:27 +04:00
|
|
|
'inputs': [
|
2013-04-05 03:04:40 +04:00
|
|
|
'<(DEPTH)/build/android/gyp/util/build_utils.py',
|
2013-04-04 13:35:50 +04:00
|
|
|
'<(DEPTH)/build/android/gyp/javac.py',
|
2014-03-13 19:47:16 +04:00
|
|
|
'>@(java_sources)',
|
2012-09-19 08:16:27 +04:00
|
|
|
'>@(input_jars_paths)',
|
2013-03-26 21:35:21 +04:00
|
|
|
'<(codegen_stamp)',
|
android: Remove three unnecessary md5sum calls.
After r256667, the list of java files for javac is written into a gyp
filelist, which gets rewritten if a java file is removed. (If a generated
java file is removed, that still doesn't cause a rebuild, but that didn't
happen before this CL either, http://crbug.com/) This allows removing the
md5sum call for javac in java_apk.gypi.
java.gypi also has additional_input_paths as input, but that's only used
for stamp files, for ordering purposes, so it's not necessary to re-run
the javac action if a stamp file disappears from additional_input_paths.
With the same reasoning, the md5sum call in 'ant package resources' is not
needed: additional_input_paths is the only non-stamp input that isn't also
on the command line. ('ant package resources' is missing some inputs, but
that's independent of this change: http://crbug.com/351928)
No behavior change.
BUG=177552
R=cjhopman@chromium.org
Review URL: https://codereview.chromium.org/198283003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@256746 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-13 08:48:10 +04:00
|
|
|
],
|
|
|
|
'conditions': [
|
|
|
|
['native_lib_target != ""', {
|
|
|
|
'inputs': [ '<(native_libraries_java_stamp)' ],
|
|
|
|
}],
|
2013-03-26 21:35:21 +04:00
|
|
|
],
|
|
|
|
'outputs': [
|
|
|
|
'<(compile_stamp)',
|
2014-06-23 22:42:13 +04:00
|
|
|
'<(javac_jar_path)',
|
2013-03-26 21:35:21 +04:00
|
|
|
],
|
2013-03-27 00:44:29 +04:00
|
|
|
'action': [
|
2013-04-04 13:35:50 +04:00
|
|
|
'python', '<(DEPTH)/build/android/gyp/javac.py',
|
2013-03-27 00:44:29 +04:00
|
|
|
'--classpath=>(input_jars_paths) <(android_sdk_jar)',
|
android: Pass (non-generated) .java files via a gyp filelist to javac.py
Before this CL, the javac action rules called `find javadir -name "*.java"` to
compute the action's inputs, and passed javadir to javac.py. The script then
again looked for all .java files in that directory. One issue with that approach
is that if a java file gets removed, the javac.py action didn't get executed again
since actions are only run if their commandline changes or an input file is newer
than an output file – a disappearing input doesn't mark an action dirty. (As
workaround, the md5 hash of all .java files is currently passed in an
--ignore parameter, so removal of a java file will lead to a changing
commandline, which _will_ cause a rebuild.)
After this CL, the result of `find javadir -name "*.java"` is written to a gyp
filelist (see https://codereview.chromium.org/27418008/), and the filelist
is passed to javac.py. gyp writes filelists exactly if their contents would
change, so removal of java file will change the mtime of the filelist, which will
cause a rebuild. Another advantage is that the list of java files is computed in
only one place.
This CL doesn't yet remove the md5 hack, but it makes it possible to do so
in a follow-up change.
(This approach doesn't work for generated java files, because these might
not yet exist at gyp time. Rename --src-dirs to --src-gendirs and keep it in
use for generated files. The dependency handling of generated java files is
done through stamp files, so the md5 hack isn't needed for them.)
No intended behavior change.
BUG=177552
R=cjhopman@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256097
Review URL: https://codereview.chromium.org/193693002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@256667 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-13 01:56:41 +04:00
|
|
|
'--src-gendirs=>(gen_src_dirs)',
|
2013-03-27 00:44:29 +04:00
|
|
|
'--javac-includes=<(javac_includes)',
|
2013-04-02 03:52:40 +04:00
|
|
|
'--chromium-code=<(chromium_code)',
|
2014-06-23 22:42:13 +04:00
|
|
|
'--jar-path=<(javac_jar_path)',
|
|
|
|
'--jar-excluded-classes=<(jar_excluded_classes)',
|
2013-03-27 00:44:29 +04:00
|
|
|
'--stamp=<(compile_stamp)',
|
2014-03-17 22:23:12 +04:00
|
|
|
'>@(java_sources)',
|
2013-03-27 00:44:29 +04:00
|
|
|
],
|
|
|
|
},
|
2013-08-22 04:08:31 +04:00
|
|
|
{
|
2014-06-23 22:42:13 +04:00
|
|
|
'action_name': 'instr_jar_<(_target_name)',
|
|
|
|
'message': 'Instrumenting <(_target_name) jar',
|
2013-08-22 04:08:31 +04:00
|
|
|
'variables': {
|
2014-06-23 22:42:13 +04:00
|
|
|
'input_path': '<(javac_jar_path)',
|
|
|
|
'output_path': '<(jar_path)',
|
2013-08-22 04:08:31 +04:00
|
|
|
'stamp_path': '<(instr_stamp)',
|
2014-06-23 22:42:13 +04:00
|
|
|
'instr_type': 'jar',
|
2013-08-22 04:08:31 +04:00
|
|
|
},
|
2013-12-11 07:02:10 +04:00
|
|
|
'outputs': [
|
|
|
|
'<(instr_stamp)',
|
2014-06-23 22:42:13 +04:00
|
|
|
'<(jar_path)',
|
2013-12-11 07:02:10 +04:00
|
|
|
],
|
2013-03-27 00:44:29 +04:00
|
|
|
'inputs': [
|
2014-06-23 22:42:13 +04:00
|
|
|
'<(javac_jar_path)',
|
2013-03-27 00:44:29 +04:00
|
|
|
],
|
2014-06-23 22:42:13 +04:00
|
|
|
'includes': [ 'android/instr_action.gypi' ],
|
2013-03-27 00:44:29 +04:00
|
|
|
},
|
2014-08-12 19:10:38 +04:00
|
|
|
{
|
|
|
|
'variables': {
|
|
|
|
'src_dirs': [
|
2014-09-09 15:44:02 +04:00
|
|
|
'<(java_in_dir)<(java_in_dir_suffix)',
|
2014-08-12 19:10:38 +04:00
|
|
|
'>@(additional_src_dirs)',
|
|
|
|
],
|
|
|
|
'lint_jar_path': '<(jar_path)',
|
|
|
|
'stamp_path': '<(lint_stamp)',
|
|
|
|
'result_path': '<(lint_result)',
|
|
|
|
'config_path': '<(lint_config)',
|
|
|
|
},
|
|
|
|
'outputs': [
|
|
|
|
'<(lint_stamp)',
|
|
|
|
],
|
|
|
|
'includes': [ 'android/lint_action.gypi' ],
|
|
|
|
},
|
2013-03-27 00:44:29 +04:00
|
|
|
{
|
2014-06-11 17:19:47 +04:00
|
|
|
'action_name': 'obfuscate_<(_target_name)',
|
2013-03-27 00:44:29 +04:00
|
|
|
'message': 'Obfuscating <(_target_name)',
|
2014-06-11 17:19:47 +04:00
|
|
|
'variables': {
|
|
|
|
'additional_obfuscate_options': [],
|
Make test apks only dex files not in tested apk (proguard version)
At runtime, the classloader will look for classes in both apk's dex
files. In the standard Android build system, an instrumentation test
apk's dex file does not include the classes included in the tested apk's
dex file.
To do this, when doing obfuscation for an apk, write the list of
libraries included in the obfuscated jar and the list of proguard config
files. Then, when proguarding the test apk's code, exclude those
libraries included in the tested apk, use the configs from the tested
apk, and apply the proguard mapping (the renames from obfuscation). Also
add some extra test-specific proguard options.
Now that the test apk does not bundle its own copy of all the tested
apk's classes, some things may need to be kept in the main apk just for
tests. However, we already keep everything in org.chromium.** and
com.google.android.apps.** because of the fact that the test apk was
using its own copy of all the classes and so we couldn't depend on the
tests to actually catch us from over-optimizing with proguard.
BUG=272790
Review URL: https://codereview.chromium.org/321883002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@277257 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-14 23:51:58 +04:00
|
|
|
'additional_obfuscate_input_paths': [],
|
2014-06-11 17:19:47 +04:00
|
|
|
'proguard_out_dir': '<(intermediate_dir)/proguard',
|
|
|
|
'proguard_input_jar_paths': [
|
|
|
|
'>@(input_jars_paths)',
|
|
|
|
'<(jar_path)',
|
|
|
|
],
|
Make test apks only dex files not in tested apk (proguard version)
At runtime, the classloader will look for classes in both apk's dex
files. In the standard Android build system, an instrumentation test
apk's dex file does not include the classes included in the tested apk's
dex file.
To do this, when doing obfuscation for an apk, write the list of
libraries included in the obfuscated jar and the list of proguard config
files. Then, when proguarding the test apk's code, exclude those
libraries included in the tested apk, use the configs from the tested
apk, and apply the proguard mapping (the renames from obfuscation). Also
add some extra test-specific proguard options.
Now that the test apk does not bundle its own copy of all the tested
apk's classes, some things may need to be kept in the main apk just for
tests. However, we already keep everything in org.chromium.** and
com.google.android.apps.** because of the fact that the test apk was
using its own copy of all the classes and so we couldn't depend on the
tests to actually catch us from over-optimizing with proguard.
BUG=272790
Review URL: https://codereview.chromium.org/321883002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@277257 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-14 23:51:58 +04:00
|
|
|
'target_conditions': [
|
2014-06-11 17:19:47 +04:00
|
|
|
['is_test_apk == 1', {
|
|
|
|
'additional_obfuscate_options': [
|
|
|
|
'--testapp',
|
|
|
|
],
|
|
|
|
}],
|
Make test apks only dex files not in tested apk (proguard version)
At runtime, the classloader will look for classes in both apk's dex
files. In the standard Android build system, an instrumentation test
apk's dex file does not include the classes included in the tested apk's
dex file.
To do this, when doing obfuscation for an apk, write the list of
libraries included in the obfuscated jar and the list of proguard config
files. Then, when proguarding the test apk's code, exclude those
libraries included in the tested apk, use the configs from the tested
apk, and apply the proguard mapping (the renames from obfuscation). Also
add some extra test-specific proguard options.
Now that the test apk does not bundle its own copy of all the tested
apk's classes, some things may need to be kept in the main apk just for
tests. However, we already keep everything in org.chromium.** and
com.google.android.apps.** because of the fact that the test apk was
using its own copy of all the classes and so we couldn't depend on the
tests to actually catch us from over-optimizing with proguard.
BUG=272790
Review URL: https://codereview.chromium.org/321883002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@277257 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-14 23:51:58 +04:00
|
|
|
['is_test_apk == 1 and tested_apk_obfuscated_jar_path != "/"', {
|
|
|
|
'additional_obfuscate_options': [
|
|
|
|
'--tested-apk-obfuscated-jar-path', '>(tested_apk_obfuscated_jar_path)',
|
|
|
|
],
|
|
|
|
'additional_obfuscate_input_paths': [
|
|
|
|
'>(tested_apk_obfuscated_jar_path).info',
|
|
|
|
],
|
|
|
|
}],
|
2014-06-11 17:19:47 +04:00
|
|
|
['proguard_enabled == "true"', {
|
|
|
|
'additional_obfuscate_options': [
|
|
|
|
'--proguard-enabled',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
Make test apks only dex files not in tested apk (proguard version)
At runtime, the classloader will look for classes in both apk's dex
files. In the standard Android build system, an instrumentation test
apk's dex file does not include the classes included in the tested apk's
dex file.
To do this, when doing obfuscation for an apk, write the list of
libraries included in the obfuscated jar and the list of proguard config
files. Then, when proguarding the test apk's code, exclude those
libraries included in the tested apk, use the configs from the tested
apk, and apply the proguard mapping (the renames from obfuscation). Also
add some extra test-specific proguard options.
Now that the test apk does not bundle its own copy of all the tested
apk's classes, some things may need to be kept in the main apk just for
tests. However, we already keep everything in org.chromium.** and
com.google.android.apps.** because of the fact that the test apk was
using its own copy of all the classes and so we couldn't depend on the
tests to actually catch us from over-optimizing with proguard.
BUG=272790
Review URL: https://codereview.chromium.org/321883002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@277257 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-14 23:51:58 +04:00
|
|
|
'obfuscate_input_jars_paths': [
|
|
|
|
'>@(input_jars_paths)',
|
|
|
|
'<(jar_path)',
|
|
|
|
],
|
2014-06-11 17:19:47 +04:00
|
|
|
},
|
|
|
|
'conditions': [
|
|
|
|
['is_test_apk == 1', {
|
|
|
|
'outputs': [
|
|
|
|
'<(test_jar_path)',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
2013-03-27 00:44:29 +04:00
|
|
|
'inputs': [
|
2014-06-11 17:19:47 +04:00
|
|
|
'<(DEPTH)/build/android/gyp/apk_obfuscate.py',
|
2013-04-05 07:41:57 +04:00
|
|
|
'<(DEPTH)/build/android/gyp/util/build_utils.py',
|
2013-04-02 13:10:54 +04:00
|
|
|
'>@(proguard_flags_paths)',
|
Make test apks only dex files not in tested apk (proguard version)
At runtime, the classloader will look for classes in both apk's dex
files. In the standard Android build system, an instrumentation test
apk's dex file does not include the classes included in the tested apk's
dex file.
To do this, when doing obfuscation for an apk, write the list of
libraries included in the obfuscated jar and the list of proguard config
files. Then, when proguarding the test apk's code, exclude those
libraries included in the tested apk, use the configs from the tested
apk, and apply the proguard mapping (the renames from obfuscation). Also
add some extra test-specific proguard options.
Now that the test apk does not bundle its own copy of all the tested
apk's classes, some things may need to be kept in the main apk just for
tests. However, we already keep everything in org.chromium.** and
com.google.android.apps.** because of the fact that the test apk was
using its own copy of all the classes and so we couldn't depend on the
tests to actually catch us from over-optimizing with proguard.
BUG=272790
Review URL: https://codereview.chromium.org/321883002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@277257 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-14 23:51:58 +04:00
|
|
|
'>@(obfuscate_input_jars_paths)',
|
|
|
|
'>@(additional_obfuscate_input_paths)',
|
|
|
|
'<(instr_stamp)',
|
2013-03-27 00:44:29 +04:00
|
|
|
],
|
|
|
|
'outputs': [
|
|
|
|
'<(obfuscate_stamp)',
|
2014-06-11 17:19:47 +04:00
|
|
|
|
|
|
|
# In non-Release builds, these paths will all be empty files.
|
|
|
|
'<(obfuscated_jar_path)',
|
Make test apks only dex files not in tested apk (proguard version)
At runtime, the classloader will look for classes in both apk's dex
files. In the standard Android build system, an instrumentation test
apk's dex file does not include the classes included in the tested apk's
dex file.
To do this, when doing obfuscation for an apk, write the list of
libraries included in the obfuscated jar and the list of proguard config
files. Then, when proguarding the test apk's code, exclude those
libraries included in the tested apk, use the configs from the tested
apk, and apply the proguard mapping (the renames from obfuscation). Also
add some extra test-specific proguard options.
Now that the test apk does not bundle its own copy of all the tested
apk's classes, some things may need to be kept in the main apk just for
tests. However, we already keep everything in org.chromium.** and
com.google.android.apps.** because of the fact that the test apk was
using its own copy of all the classes and so we couldn't depend on the
tests to actually catch us from over-optimizing with proguard.
BUG=272790
Review URL: https://codereview.chromium.org/321883002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@277257 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-14 23:51:58 +04:00
|
|
|
'<(obfuscated_jar_path).info',
|
2014-06-11 17:19:47 +04:00
|
|
|
'<(obfuscated_jar_path).dump',
|
|
|
|
'<(obfuscated_jar_path).seeds',
|
|
|
|
'<(obfuscated_jar_path).mapping',
|
|
|
|
'<(obfuscated_jar_path).usage',
|
2013-03-27 00:44:29 +04:00
|
|
|
],
|
2013-03-26 21:35:21 +04:00
|
|
|
'action': [
|
2014-06-11 17:19:47 +04:00
|
|
|
'python', '<(DEPTH)/build/android/gyp/apk_obfuscate.py',
|
|
|
|
|
|
|
|
'--configuration-name', '<(CONFIGURATION_NAME)',
|
|
|
|
|
|
|
|
'--android-sdk', '<(android_sdk)',
|
|
|
|
'--android-sdk-tools', '<(android_sdk_tools)',
|
|
|
|
'--android-sdk-jar', '<(android_sdk_jar)',
|
|
|
|
|
|
|
|
'--input-jars-paths=>(proguard_input_jar_paths)',
|
Make test apks only dex files not in tested apk (proguard version)
At runtime, the classloader will look for classes in both apk's dex
files. In the standard Android build system, an instrumentation test
apk's dex file does not include the classes included in the tested apk's
dex file.
To do this, when doing obfuscation for an apk, write the list of
libraries included in the obfuscated jar and the list of proguard config
files. Then, when proguarding the test apk's code, exclude those
libraries included in the tested apk, use the configs from the tested
apk, and apply the proguard mapping (the renames from obfuscation). Also
add some extra test-specific proguard options.
Now that the test apk does not bundle its own copy of all the tested
apk's classes, some things may need to be kept in the main apk just for
tests. However, we already keep everything in org.chromium.** and
com.google.android.apps.** because of the fact that the test apk was
using its own copy of all the classes and so we couldn't depend on the
tests to actually catch us from over-optimizing with proguard.
BUG=272790
Review URL: https://codereview.chromium.org/321883002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@277257 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-14 23:51:58 +04:00
|
|
|
'--proguard-configs=>(proguard_flags_paths)',
|
|
|
|
|
2014-06-11 17:19:47 +04:00
|
|
|
'--test-jar-path', '<(test_jar_path)',
|
|
|
|
'--obfuscated-jar-path', '<(obfuscated_jar_path)',
|
|
|
|
|
|
|
|
'--proguard-jar-path', '<(android_sdk_root)/tools/proguard/lib/proguard.jar',
|
|
|
|
|
|
|
|
'--stamp', '<(obfuscate_stamp)',
|
2013-03-26 21:35:21 +04:00
|
|
|
|
Make test apks only dex files not in tested apk (proguard version)
At runtime, the classloader will look for classes in both apk's dex
files. In the standard Android build system, an instrumentation test
apk's dex file does not include the classes included in the tested apk's
dex file.
To do this, when doing obfuscation for an apk, write the list of
libraries included in the obfuscated jar and the list of proguard config
files. Then, when proguarding the test apk's code, exclude those
libraries included in the tested apk, use the configs from the tested
apk, and apply the proguard mapping (the renames from obfuscation). Also
add some extra test-specific proguard options.
Now that the test apk does not bundle its own copy of all the tested
apk's classes, some things may need to be kept in the main apk just for
tests. However, we already keep everything in org.chromium.** and
com.google.android.apps.** because of the fact that the test apk was
using its own copy of all the classes and so we couldn't depend on the
tests to actually catch us from over-optimizing with proguard.
BUG=272790
Review URL: https://codereview.chromium.org/321883002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@277257 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-14 23:51:58 +04:00
|
|
|
'>@(additional_obfuscate_options)',
|
2013-03-26 21:35:21 +04:00
|
|
|
],
|
|
|
|
},
|
2013-03-27 00:44:29 +04:00
|
|
|
{
|
|
|
|
'action_name': 'dex_<(_target_name)',
|
|
|
|
'variables': {
|
2014-06-13 00:28:16 +04:00
|
|
|
'dex_input_paths': [
|
2014-06-23 22:42:13 +04:00
|
|
|
'>@(library_dexed_jars_paths)',
|
2014-06-13 00:28:16 +04:00
|
|
|
'<(jar_path)',
|
|
|
|
],
|
2014-06-23 22:42:13 +04:00
|
|
|
'output_path': '<(dex_path)',
|
android: Make dex_action.gypi not call md5sum.
No intended behavior change.
dex_action.gypi didn't pass its input_paths variable to dex.py,
but that was only set in a single place, and only to a single file there.
It was only used in java_apk.gypi which does manual threading of
stamp files to order actions (since it's a gypi, it can't easily use type
none targets with dependencies). Since dex.py doesn't look at this
stamp file at all, it doesn't need to rerun when the stamp file disappears.
To make this a bit more obvious, remove dex_action.gypi's input_paths
variable and set 'inputs' directly in the one place with the stamp file.
(dex.py will still rerun if the name of the stamp file changes, due to
regular timestamp handling.)
java_apk.gypi used to set input_paths to two files in proguard-enabled
files – change it to depend only on obfuscate_stamp in proguard builds,
as the step that writes that already depends on instr_stamp. (This isn't
necessary as the proguard state is part of the dex.py commandline, so
toggling between proguard and no proguard would rebuild correctly
anyways, but it's conceptually a bit nicer.)
Also set proguard_enabled_input_path unconditionally. Again, no behavior
change, but keeps the gyp a bit shorter.
BUG=177552
NOTRY=true
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255325
R=cjhopman@chromium.org
Review URL: https://codereview.chromium.org/183883024
git-svn-id: http://src.chromium.org/svn/trunk/src/build@255403 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-06 22:47:27 +04:00
|
|
|
'proguard_enabled_input_path': '<(obfuscated_jar_path)',
|
2013-03-27 00:44:29 +04:00
|
|
|
},
|
2014-06-13 00:28:16 +04:00
|
|
|
'target_conditions': [
|
|
|
|
['emma_instrument != 0', {
|
2014-07-16 04:35:42 +04:00
|
|
|
'variables': {
|
|
|
|
'dex_no_locals': 1,
|
|
|
|
'dex_input_paths': [
|
|
|
|
'<(emma_device_jar)'
|
|
|
|
],
|
|
|
|
},
|
2014-06-13 00:28:16 +04:00
|
|
|
}],
|
|
|
|
['is_test_apk == 1 and tested_apk_dex_path != "/"', {
|
|
|
|
'variables': {
|
|
|
|
'dex_additional_options': [
|
2015-02-26 13:52:54 +03:00
|
|
|
'--excluded-paths', '@FileArg(>(tested_apk_dex_path).inputs)'
|
2014-06-13 00:28:16 +04:00
|
|
|
],
|
|
|
|
},
|
|
|
|
'inputs': [
|
|
|
|
'>(tested_apk_dex_path).inputs',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
['proguard_enabled == "true"', {
|
|
|
|
'inputs': [ '<(obfuscate_stamp)' ]
|
|
|
|
}, {
|
|
|
|
'inputs': [ '<(instr_stamp)' ]
|
|
|
|
}],
|
android: Make dex_action.gypi not call md5sum.
No intended behavior change.
dex_action.gypi didn't pass its input_paths variable to dex.py,
but that was only set in a single place, and only to a single file there.
It was only used in java_apk.gypi which does manual threading of
stamp files to order actions (since it's a gypi, it can't easily use type
none targets with dependencies). Since dex.py doesn't look at this
stamp file at all, it doesn't need to rerun when the stamp file disappears.
To make this a bit more obvious, remove dex_action.gypi's input_paths
variable and set 'inputs' directly in the one place with the stamp file.
(dex.py will still rerun if the name of the stamp file changes, due to
regular timestamp handling.)
java_apk.gypi used to set input_paths to two files in proguard-enabled
files – change it to depend only on obfuscate_stamp in proguard builds,
as the step that writes that already depends on instr_stamp. (This isn't
necessary as the proguard state is part of the dex.py commandline, so
toggling between proguard and no proguard would rebuild correctly
anyways, but it's conceptually a bit nicer.)
Also set proguard_enabled_input_path unconditionally. Again, no behavior
change, but keeps the gyp a bit shorter.
BUG=177552
NOTRY=true
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255325
R=cjhopman@chromium.org
Review URL: https://codereview.chromium.org/183883024
git-svn-id: http://src.chromium.org/svn/trunk/src/build@255403 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-06 22:47:27 +04:00
|
|
|
],
|
2013-05-18 06:33:37 +04:00
|
|
|
'includes': [ 'android/dex_action.gypi' ],
|
2013-03-27 00:44:29 +04:00
|
|
|
},
|
2013-03-26 21:35:21 +04:00
|
|
|
{
|
2014-05-28 23:50:08 +04:00
|
|
|
'variables': {
|
2015-05-15 23:38:55 +03:00
|
|
|
'extra_inputs': ['<(codegen_stamp)'],
|
|
|
|
'resource_zips': [
|
2014-06-11 05:20:55 +04:00
|
|
|
'<(resource_zip_path)',
|
2014-05-28 23:50:08 +04:00
|
|
|
],
|
2014-11-14 01:37:56 +03:00
|
|
|
'conditions': [
|
2015-05-15 23:38:55 +03:00
|
|
|
['is_test_apk == 0', {
|
|
|
|
'resource_zips': [
|
|
|
|
'>@(dependencies_res_zip_paths)',
|
|
|
|
],
|
2014-11-14 01:37:56 +03:00
|
|
|
}],
|
|
|
|
],
|
2014-05-28 23:50:08 +04:00
|
|
|
},
|
2015-05-15 23:38:55 +03:00
|
|
|
'includes': [ 'android/package_resources_action.gypi' ],
|
2013-04-11 03:10:17 +04:00
|
|
|
},
|
|
|
|
{
|
2014-03-21 03:22:44 +04:00
|
|
|
'variables': {
|
2015-05-15 22:23:31 +03:00
|
|
|
'apk_path': '<(unsigned_apk_path)',
|
|
|
|
'conditions': [
|
|
|
|
['native_lib_target != ""', {
|
|
|
|
'extra_inputs': ['<(native_lib_placeholder_stamp)'],
|
|
|
|
}],
|
2015-05-19 19:58:32 +03:00
|
|
|
['create_abi_split == 0', {
|
|
|
|
'native_libs_dir': '<(apk_package_native_libs_dir)',
|
|
|
|
}, {
|
|
|
|
'native_libs_dir': '<(DEPTH)/build/android/ant/empty/res',
|
|
|
|
}],
|
2015-05-15 22:23:31 +03:00
|
|
|
],
|
2014-03-21 03:22:44 +04:00
|
|
|
},
|
2015-05-15 22:23:31 +03:00
|
|
|
'includes': ['android/apkbuilder_action.gypi'],
|
2012-09-19 08:16:27 +04:00
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|