Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # Do not add any imports to non-//build directories here. | 5 # Do not add any imports to non-//build directories here. |
| 6 # Some projects (e.g. V8) do not have non-build directories DEPS'ed in. | 6 # Some projects (e.g. V8) do not have non-build directories DEPS'ed in. |
| 7 import("//build/config/android/config.gni") | 7 import("//build/config/android/config.gni") |
| 8 import("//build/config/android/internal_rules.gni") | 8 import("//build/config/android/internal_rules.gni") |
| 9 import("//build/config/compiler/compiler.gni") | 9 import("//build/config/compiler/compiler.gni") |
| 10 import("//build/config/dcheck_always_on.gni") | 10 import("//build/config/dcheck_always_on.gni") |
| (...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1457 # dependencies will also be included in the apk (e.g. for is_component_bui ld). | 1457 # dependencies will also be included in the apk (e.g. for is_component_bui ld). |
| 1458 # native_lib_placeholders: List of placeholder filenames to add to the apk | 1458 # native_lib_placeholders: List of placeholder filenames to add to the apk |
| 1459 # (optional). | 1459 # (optional). |
| 1460 # apk_under_test: For an instrumentation test apk, this is the target of the | 1460 # apk_under_test: For an instrumentation test apk, this is the target of the |
| 1461 # tested apk. | 1461 # tested apk. |
| 1462 # include_all_resources - If true include all resource IDs in all generated | 1462 # include_all_resources - If true include all resource IDs in all generated |
| 1463 # R.java files. | 1463 # R.java files. |
| 1464 # testonly: Marks this target as "test-only". | 1464 # testonly: Marks this target as "test-only". |
| 1465 # write_asset_list: Adds an extra file to the assets, which contains a list of | 1465 # write_asset_list: Adds an extra file to the assets, which contains a list of |
| 1466 # all other asset files. | 1466 # all other asset files. |
| 1467 # generate_buildconfig_java: If defined and false, skip generating the | |
| 1468 # BuildConfig java class describing the build configuration. The default | |
| 1469 # is true. | |
|
jbudorick
2017/02/28 16:36:27
nit: mention that the default is true for non-test
Torne
2017/03/01 10:56:29
Done.
| |
| 1467 # requires_sdk_api_level_23: If defined and true, the apk is intended for | 1470 # requires_sdk_api_level_23: If defined and true, the apk is intended for |
| 1468 # installation only on Android M or later. In these releases the system | 1471 # installation only on Android M or later. In these releases the system |
| 1469 # linker does relocation unpacking, so we can enable it unconditionally. | 1472 # linker does relocation unpacking, so we can enable it unconditionally. |
| 1470 # secondary_native_libs (deprecated): The path of native libraries for secon dary | 1473 # secondary_native_libs (deprecated): The path of native libraries for secon dary |
| 1471 # app abi. | 1474 # app abi. |
| 1472 # run_findbugs_override: Forces run_findbugs on or off. If undefined, the | 1475 # run_findbugs_override: Forces run_findbugs on or off. If undefined, the |
| 1473 # default will use the build arg run_findbugs. | 1476 # default will use the build arg run_findbugs. |
| 1474 # proguard_jar_path: The path to proguard.jar you wish to use. If undefined, | 1477 # proguard_jar_path: The path to proguard.jar you wish to use. If undefined, |
| 1475 # the proguard used will be the checked in one in //third_party/proguard. | 1478 # the proguard used will be the checked in one in //third_party/proguard. |
| 1476 # never_incremental: If true, |incremental_apk_by_default| will be ignored. | 1479 # never_incremental: If true, |incremental_apk_by_default| will be ignored. |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1668 } | 1671 } |
| 1669 _android_manifest = invoker.android_manifest | 1672 _android_manifest = invoker.android_manifest |
| 1670 | 1673 |
| 1671 _rebased_build_config = rebase_path(_build_config, root_build_dir) | 1674 _rebased_build_config = rebase_path(_build_config, root_build_dir) |
| 1672 _create_abi_split = | 1675 _create_abi_split = |
| 1673 defined(invoker.create_abi_split) && invoker.create_abi_split | 1676 defined(invoker.create_abi_split) && invoker.create_abi_split |
| 1674 _create_density_splits = | 1677 _create_density_splits = |
| 1675 defined(invoker.create_density_splits) && invoker.create_density_splits | 1678 defined(invoker.create_density_splits) && invoker.create_density_splits |
| 1676 _create_language_splits = | 1679 _create_language_splits = |
| 1677 defined(invoker.language_splits) && invoker.language_splits != [] | 1680 defined(invoker.language_splits) && invoker.language_splits != [] |
| 1681 _generate_buildconfig_java = !defined(invoker.apk_under_test) | |
| 1682 if (defined(invoker.generate_buildconfig_java)) { | |
| 1683 _generate_buildconfig_java = invoker.generate_buildconfig_java | |
| 1684 } | |
| 1678 | 1685 |
| 1679 # Help GN understand that _create_abi_split is not unused (bug in GN). | 1686 # Help GN understand that _create_abi_split is not unused (bug in GN). |
| 1680 assert(_create_abi_split || true) | 1687 assert(_create_abi_split || true) |
| 1681 | 1688 |
| 1682 _proguard_enabled = | 1689 _proguard_enabled = |
| 1683 defined(invoker.proguard_enabled) && invoker.proguard_enabled | 1690 defined(invoker.proguard_enabled) && invoker.proguard_enabled |
| 1684 if (_proguard_enabled) { | 1691 if (_proguard_enabled) { |
| 1685 _proguard_output_jar_path = "$base_path.proguard.jar" | 1692 _proguard_output_jar_path = "$base_path.proguard.jar" |
| 1686 } | 1693 } |
| 1687 | 1694 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1828 if (_load_library_from_apk) { | 1835 if (_load_library_from_apk) { |
| 1829 defines += [ "ENABLE_CHROMIUM_LINKER_LIBRARY_IN_ZIP_FILE" ] | 1836 defines += [ "ENABLE_CHROMIUM_LINKER_LIBRARY_IN_ZIP_FILE" ] |
| 1830 } | 1837 } |
| 1831 if (_enable_chromium_linker_tests) { | 1838 if (_enable_chromium_linker_tests) { |
| 1832 defines += [ "ENABLE_CHROMIUM_LINKER_TESTS" ] | 1839 defines += [ "ENABLE_CHROMIUM_LINKER_TESTS" ] |
| 1833 } | 1840 } |
| 1834 } | 1841 } |
| 1835 _srcjar_deps += [ ":${_template_name}__native_libraries_java" ] | 1842 _srcjar_deps += [ ":${_template_name}__native_libraries_java" ] |
| 1836 } | 1843 } |
| 1837 | 1844 |
| 1838 if (!defined(invoker.apk_under_test)) { | 1845 if (_generate_buildconfig_java) { |
| 1839 java_cpp_template("${_template_name}__build_config_java") { | 1846 java_cpp_template("${_template_name}__build_config_java") { |
| 1840 package_name = "org/chromium/base" | 1847 package_name = "org/chromium/base" |
| 1841 sources = [ | 1848 sources = [ |
| 1842 "//base/android/java/templates/BuildConfig.template", | 1849 "//base/android/java/templates/BuildConfig.template", |
| 1843 ] | 1850 ] |
| 1844 deps = [ | 1851 deps = [ |
| 1845 ":$build_config_target", | 1852 ":$build_config_target", |
| 1846 ] | 1853 ] |
| 1847 | 1854 |
| 1848 defines = [] | 1855 defines = [] |
| (...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2884 # because in practice they seem to contain classes required to be in the | 2891 # because in practice they seem to contain classes required to be in the |
| 2885 # classpath. | 2892 # classpath. |
| 2886 deps += _subjar_targets | 2893 deps += _subjar_targets |
| 2887 } | 2894 } |
| 2888 if (defined(_res_target_name)) { | 2895 if (defined(_res_target_name)) { |
| 2889 deps += [ ":$_res_target_name" ] | 2896 deps += [ ":$_res_target_name" ] |
| 2890 } | 2897 } |
| 2891 } | 2898 } |
| 2892 } | 2899 } |
| 2893 } | 2900 } |
| OLD | NEW |