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/toolchain/toolchain.gni") | 8 import("//build/toolchain/toolchain.gni") |
9 import("//third_party/android_platform/config.gni") | 9 import("//third_party/android_platform/config.gni") |
10 import("//tools/grit/grit_rule.gni") | 10 import("//tools/grit/grit_rule.gni") |
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1101 } | 1101 } |
1102 | 1102 |
1103 # Declare an Android apk target | 1103 # Declare an Android apk target |
1104 # | 1104 # |
1105 # This target creates an Android APK containing java code, resources, assets, | 1105 # This target creates an Android APK containing java code, resources, assets, |
1106 # and (possibly) native libraries. | 1106 # and (possibly) native libraries. |
1107 # | 1107 # |
1108 # Variables | 1108 # Variables |
1109 # android_manifest: Path to AndroidManifest.xml. | 1109 # android_manifest: Path to AndroidManifest.xml. |
1110 # android_manifest_dep: Target that generates AndroidManifest (if applicable) | 1110 # android_manifest_dep: Target that generates AndroidManifest (if applicable) |
| 1111 # chromium_code: If true, extra analysis warning/errors will be enabled. |
1111 # data_deps: List of dependencies needed at runtime. These will be built but | 1112 # data_deps: List of dependencies needed at runtime. These will be built but |
1112 # won't change the generated .apk in any way (in fact they may be built | 1113 # won't change the generated .apk in any way (in fact they may be built |
1113 # after the .apk is). | 1114 # after the .apk is). |
1114 # deps: List of dependencies. All Android java resources and libraries in the | 1115 # deps: List of dependencies. All Android java resources and libraries in the |
1115 # "transitive closure" of these dependencies will be included in the apk. | 1116 # "transitive closure" of these dependencies will be included in the apk. |
1116 # Note: this "transitive closure" actually only includes such targets if | 1117 # Note: this "transitive closure" actually only includes such targets if |
1117 # they are depended on through android_library or android_resources targets | 1118 # they are depended on through android_library or android_resources targets |
1118 # (and so not through builtin targets like 'action', 'group', etc). | 1119 # (and so not through builtin targets like 'action', 'group', etc). |
1119 # java_files: List of .java files to include in the apk. | 1120 # java_files: List of .java files to include in the apk. |
1120 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars | 1121 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1379 java_target = "${_template_name}__java" | 1380 java_target = "${_template_name}__java" |
1380 java_library_impl(java_target) { | 1381 java_library_impl(java_target) { |
1381 forward_variables_from(invoker, [ "run_findbugs" ]) | 1382 forward_variables_from(invoker, [ "run_findbugs" ]) |
1382 supports_android = true | 1383 supports_android = true |
1383 requires_android = true | 1384 requires_android = true |
1384 override_build_config = _build_config | 1385 override_build_config = _build_config |
1385 deps = _android_manifest_deps + [ ":$build_config_target" ] | 1386 deps = _android_manifest_deps + [ ":$build_config_target" ] |
1386 | 1387 |
1387 android_manifest = _android_manifest | 1388 android_manifest = _android_manifest |
1388 chromium_code = true | 1389 chromium_code = true |
| 1390 if (defined(invoker.chromium_code)) { |
| 1391 chromium_code = invoker.chromium_code |
| 1392 } |
| 1393 |
1389 if (defined(invoker.java_files)) { | 1394 if (defined(invoker.java_files)) { |
1390 java_files = invoker.java_files | 1395 java_files = invoker.java_files |
1391 } else if (defined(invoker.DEPRECATED_java_in_dir)) { | 1396 } else if (defined(invoker.DEPRECATED_java_in_dir)) { |
1392 DEPRECATED_java_in_dir = invoker.DEPRECATED_java_in_dir | 1397 DEPRECATED_java_in_dir = invoker.DEPRECATED_java_in_dir |
1393 } else { | 1398 } else { |
1394 java_files = [] | 1399 java_files = [] |
1395 } | 1400 } |
1396 srcjar_deps = _srcjar_deps | 1401 srcjar_deps = _srcjar_deps |
1397 jar_path = _jar_path | 1402 jar_path = _jar_path |
1398 dex_path = _lib_dex_path | 1403 dex_path = _lib_dex_path |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2041 | 2046 |
2042 # TODO(GYP): implement this. | 2047 # TODO(GYP): implement this. |
2043 template("uiautomator_test") { | 2048 template("uiautomator_test") { |
2044 set_sources_assignment_filter([]) | 2049 set_sources_assignment_filter([]) |
2045 forward_variables_from(invoker, [ "testonly" ]) | 2050 forward_variables_from(invoker, [ "testonly" ]) |
2046 assert(target_name != "") | 2051 assert(target_name != "") |
2047 assert(invoker.deps != [] || true) | 2052 assert(invoker.deps != [] || true) |
2048 group(target_name) { | 2053 group(target_name) { |
2049 } | 2054 } |
2050 } | 2055 } |
OLD | NEW |