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 import("//base/android/linker/config.gni") | 5 import("//base/android/linker/config.gni") |
6 import("//build/config/android/config.gni") | 6 import("//build/config/android/config.gni") |
7 import("//build/config/android/internal_rules.gni") | 7 import("//build/config/android/internal_rules.gni") |
8 import("//build/config/sanitizers/sanitizers.gni") | 8 import("//build/config/sanitizers/sanitizers.gni") |
9 import("//build/toolchain/toolchain.gni") | 9 import("//build/toolchain/toolchain.gni") |
10 import("//third_party/android_platform/config.gni") | 10 import("//third_party/android_platform/config.gni") |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 # | 993 # |
994 # Variables | 994 # Variables |
995 # deps: Specifies the dependencies of this target. Java targets in this list | 995 # deps: Specifies the dependencies of this target. Java targets in this list |
996 # will be added to the javac classpath. | 996 # will be added to the javac classpath. |
997 # | 997 # |
998 # java_files: List of .java files included in this library. | 998 # java_files: List of .java files included in this library. |
999 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars | 999 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars |
1000 # will be added to java_files and be included in this library. | 1000 # will be added to java_files and be included in this library. |
1001 # srcjars: List of srcjars to be included in this library, together with the | 1001 # srcjars: List of srcjars to be included in this library, together with the |
1002 # ones obtained from srcjar_deps. | 1002 # ones obtained from srcjar_deps. |
1003 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in | |
1004 # this directory will be included in the library. This is only supported to | |
1005 # ease the gyp->gn conversion and will be removed in the future. | |
1006 # | 1003 # |
1007 # chromium_code: If true, extra analysis warning/errors will be enabled. | 1004 # chromium_code: If true, extra analysis warning/errors will be enabled. |
1008 # enable_errorprone: If true, enables the errorprone compiler. | 1005 # enable_errorprone: If true, enables the errorprone compiler. |
1009 # enable_incremental_javac: Overrides the global enable_incremental_javac. | 1006 # enable_incremental_javac: Overrides the global enable_incremental_javac. |
1010 # | 1007 # |
1011 # jar_excluded_patterns: List of patterns of .class files to exclude from the | 1008 # jar_excluded_patterns: List of patterns of .class files to exclude from the |
1012 # final jar. | 1009 # final jar. |
1013 # | 1010 # |
1014 # proguard_preprocess: If true, proguard preprocessing will be run. This can | 1011 # proguard_preprocess: If true, proguard preprocessing will be run. This can |
1015 # be used to remove unwanted parts of the library. | 1012 # be used to remove unwanted parts of the library. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 # Variables | 1082 # Variables |
1086 # deps: Specifies the dependencies of this target. Java targets in this list | 1083 # deps: Specifies the dependencies of this target. Java targets in this list |
1087 # will be added to the javac classpath. Android resources in dependencies | 1084 # will be added to the javac classpath. Android resources in dependencies |
1088 # will be used when building this library. | 1085 # will be used when building this library. |
1089 # | 1086 # |
1090 # java_files: List of .java files included in this library. | 1087 # java_files: List of .java files included in this library. |
1091 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars | 1088 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars |
1092 # will be added to java_files and be included in this library. | 1089 # will be added to java_files and be included in this library. |
1093 # srcjars: List of srcjars to be included in this library, together with the | 1090 # srcjars: List of srcjars to be included in this library, together with the |
1094 # ones obtained from srcjar_deps. | 1091 # ones obtained from srcjar_deps. |
1095 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in | |
1096 # this directory will be included in the library. This is only supported to | |
1097 # ease the gyp->gn conversion and will be removed in the future. | |
1098 # | 1092 # |
1099 # chromium_code: If true, extra analysis warning/errors will be enabled. | 1093 # chromium_code: If true, extra analysis warning/errors will be enabled. |
1100 # enable_errorprone: If true, enables the errorprone compiler. | 1094 # enable_errorprone: If true, enables the errorprone compiler. |
1101 # enable_incremental_javac: Overrides the global enable_incremental_javac. | 1095 # enable_incremental_javac: Overrides the global enable_incremental_javac. |
1102 # | 1096 # |
1103 # jar_excluded_patterns: List of patterns of .class files to exclude from the | 1097 # jar_excluded_patterns: List of patterns of .class files to exclude from the |
1104 # final jar. | 1098 # final jar. |
1105 # | 1099 # |
1106 # proguard_preprocess: If true, proguard preprocessing will be run. This can | 1100 # proguard_preprocess: If true, proguard preprocessing will be run. This can |
1107 # be used to remove unwanted parts of the library. | 1101 # be used to remove unwanted parts of the library. |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1264 # R.java files. | 1258 # R.java files. |
1265 # testonly: Marks this target as "test-only". | 1259 # testonly: Marks this target as "test-only". |
1266 # write_asset_list: Adds an extra file to the assets, which contains a list of | 1260 # write_asset_list: Adds an extra file to the assets, which contains a list of |
1267 # all other asset files. | 1261 # all other asset files. |
1268 # alternative_locale_resource_dep: The locale resource target which overrides | 1262 # alternative_locale_resource_dep: The locale resource target which overrides |
1269 # any exsting locale resources in dep graph. | 1263 # any exsting locale resources in dep graph. |
1270 # requires_sdk_api_level_23: If defined and true, the apk is intended for | 1264 # requires_sdk_api_level_23: If defined and true, the apk is intended for |
1271 # installation only on Android M or later. In these releases the system | 1265 # installation only on Android M or later. In these releases the system |
1272 # linker does relocation unpacking, so we can enable it unconditionally. | 1266 # linker does relocation unpacking, so we can enable it unconditionally. |
1273 # | 1267 # |
1274 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in | |
1275 # this directory will be included in the library. This is only supported to | |
1276 # ease the gyp->gn conversion and will be removed in the future. | |
1277 # | |
1278 # Example | 1268 # Example |
1279 # android_apk("foo_apk") { | 1269 # android_apk("foo_apk") { |
1280 # android_manifest = "AndroidManifest.xml" | 1270 # android_manifest = "AndroidManifest.xml" |
1281 # java_files = [ | 1271 # java_files = [ |
1282 # "android/org/chromium/foo/FooApplication.java", | 1272 # "android/org/chromium/foo/FooApplication.java", |
1283 # "android/org/chromium/foo/FooActivity.java", | 1273 # "android/org/chromium/foo/FooActivity.java", |
1284 # ] | 1274 # ] |
1285 # deps = [ | 1275 # deps = [ |
1286 # ":foo_support_java" | 1276 # ":foo_support_java" |
1287 # ":foo_resources" | 1277 # ":foo_resources" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1564 deps = _android_manifest_deps + [ ":$build_config_target" ] | 1554 deps = _android_manifest_deps + [ ":$build_config_target" ] |
1565 | 1555 |
1566 android_manifest = _android_manifest | 1556 android_manifest = _android_manifest |
1567 chromium_code = true | 1557 chromium_code = true |
1568 if (defined(invoker.chromium_code)) { | 1558 if (defined(invoker.chromium_code)) { |
1569 chromium_code = invoker.chromium_code | 1559 chromium_code = invoker.chromium_code |
1570 } | 1560 } |
1571 | 1561 |
1572 if (defined(invoker.java_files)) { | 1562 if (defined(invoker.java_files)) { |
1573 java_files = invoker.java_files | 1563 java_files = invoker.java_files |
1574 } else if (defined(invoker.DEPRECATED_java_in_dir)) { | |
1575 DEPRECATED_java_in_dir = invoker.DEPRECATED_java_in_dir | |
1576 } else { | 1564 } else { |
1577 java_files = [] | 1565 java_files = [] |
1578 } | 1566 } |
1579 srcjar_deps = _srcjar_deps | 1567 srcjar_deps = _srcjar_deps |
1580 jar_path = _jar_path | 1568 jar_path = _jar_path |
1581 dex_path = _lib_dex_path | 1569 dex_path = _lib_dex_path |
1582 emma_never_instrument = _emma_never_instrument | 1570 emma_never_instrument = _emma_never_instrument |
1583 | 1571 |
1584 if (defined(invoker.deps)) { | 1572 if (defined(invoker.deps)) { |
1585 deps += invoker.deps | 1573 deps += invoker.deps |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1974 # will be added to java_files and be included in this apk. | 1962 # will be added to java_files and be included in this apk. |
1975 # apk_name: Name for final apk. | 1963 # apk_name: Name for final apk. |
1976 # final_apk_path: Path to final built apk. Default is | 1964 # final_apk_path: Path to final built apk. Default is |
1977 # $root_out_dir/apks/$apk_name.apk. Setting this will override apk_name. | 1965 # $root_out_dir/apks/$apk_name.apk. Setting this will override apk_name. |
1978 # native_libs: List paths of native libraries to include in this apk. If these | 1966 # native_libs: List paths of native libraries to include in this apk. If these |
1979 # libraries depend on other shared_library targets, those dependencies will | 1967 # libraries depend on other shared_library targets, those dependencies will |
1980 # also be included in the apk. | 1968 # also be included in the apk. |
1981 # apk_under_test: The apk being tested. | 1969 # apk_under_test: The apk being tested. |
1982 # isolate_file: Isolate file containing the list of test data dependencies. | 1970 # isolate_file: Isolate file containing the list of test data dependencies. |
1983 # | 1971 # |
1984 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in | |
1985 # this directory will be included in the library. This is only supported to | |
1986 # ease the gyp->gn conversion and will be removed in the future. | |
1987 # | |
1988 # Example | 1972 # Example |
1989 # instrumentation_test_apk("foo_test_apk") { | 1973 # instrumentation_test_apk("foo_test_apk") { |
1990 # android_manifest = "AndroidManifest.xml" | 1974 # android_manifest = "AndroidManifest.xml" |
1991 # apk_name = "FooTest" | 1975 # apk_name = "FooTest" |
1992 # apk_under_test = "Foo" | 1976 # apk_under_test = "Foo" |
1993 # java_files = [ | 1977 # java_files = [ |
1994 # "android/org/chromium/foo/FooTestCase.java", | 1978 # "android/org/chromium/foo/FooTestCase.java", |
1995 # "android/org/chromium/foo/FooExampleTest.java", | 1979 # "android/org/chromium/foo/FooExampleTest.java", |
1996 # ] | 1980 # ] |
1997 # deps = [ | 1981 # deps = [ |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2038 data_deps += [ | 2022 data_deps += [ |
2039 "//testing/android/driver:driver_apk", | 2023 "//testing/android/driver:driver_apk", |
2040 "//tools/android/forwarder2", | 2024 "//tools/android/forwarder2", |
2041 "//tools/android/md5sum", | 2025 "//tools/android/md5sum", |
2042 ] | 2026 ] |
2043 if (defined(invoker.additional_apks)) { | 2027 if (defined(invoker.additional_apks)) { |
2044 data_deps += invoker.additional_apks | 2028 data_deps += invoker.additional_apks |
2045 } | 2029 } |
2046 | 2030 |
2047 create_dist_ijar = true | 2031 create_dist_ijar = true |
2048 run_findbugs = | 2032 run_findbugs = defined(invoker.run_findbugs) && invoker.run_findbugs && |
2049 defined(invoker.run_findbugs) && invoker.run_findbugs && | 2033 defined(invoker.java_files) |
2050 (defined(invoker.java_files) || defined(invoker.DEPRECATED_java_in_dir)) | |
2051 } | 2034 } |
2052 | 2035 |
2053 group(target_name) { | 2036 group(target_name) { |
2054 public_deps = [ | 2037 public_deps = [ |
2055 ":$_apk_target_name", | 2038 ":$_apk_target_name", |
2056 ":$_test_runner_target_name", | 2039 ":$_test_runner_target_name", |
2057 | 2040 |
2058 # Required by test runner to enumerate test list. | 2041 # Required by test runner to enumerate test list. |
2059 ":${_apk_target_name}_dist_ijar", | 2042 ":${_apk_target_name}_dist_ijar", |
2060 ] | 2043 ] |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2424 "--target", | 2407 "--target", |
2425 rebase_path(invoker.target, root_build_dir), | 2408 rebase_path(invoker.target, root_build_dir), |
2426 "--output-directory", | 2409 "--output-directory", |
2427 rebase_path(root_out_dir, root_build_dir), | 2410 rebase_path(root_out_dir, root_build_dir), |
2428 ] | 2411 ] |
2429 if (defined(invoker.flag_name)) { | 2412 if (defined(invoker.flag_name)) { |
2430 args += [ "--flag-name=${invoker.flag_name}" ] | 2413 args += [ "--flag-name=${invoker.flag_name}" ] |
2431 } | 2414 } |
2432 } | 2415 } |
2433 } | 2416 } |
OLD | NEW |