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_overrides/build.gni") | 7 import("//build_overrides/build.gni") |
8 import("//build/config/android/config.gni") | 8 import("//build/config/android/config.gni") |
9 import("//build/config/sanitizers/sanitizers.gni") | 9 import("//build/config/sanitizers/sanitizers.gni") |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 "//build/android/pylib/device/commands:chromium_commands", | 34 "//build/android/pylib/device/commands:chromium_commands", |
35 "//build/android/rezip:rezip", | 35 "//build/android/rezip:rezip", |
36 "//chrome/test/android/cast_emulator:cast_emulator", | 36 "//chrome/test/android/cast_emulator:cast_emulator", |
37 "//components/cronet/android:cronet_api", | 37 "//components/cronet/android:cronet_api", |
38 "//components/cronet/android:cronet_javadoc_classpath", | 38 "//components/cronet/android:cronet_javadoc_classpath", |
39 "//components/policy:app_restrictions_resources", | 39 "//components/policy:app_restrictions_resources", |
40 "//device/battery/android:battery_monitor_android", | 40 "//device/battery/android:battery_monitor_android", |
41 "//device/vibration/android:vibration_manager_android", | 41 "//device/vibration/android:vibration_manager_android", |
42 "//mojo/public/java:bindings", | 42 "//mojo/public/java:bindings", |
43 "//mojo/public/java:system", | 43 "//mojo/public/java:system", |
44 "//third_party/android_tools:emma_device", | |
45 "//third_party/cardboard-java:cardboard-java", | |
46 "//third_party/custom_tabs_client:custom_tabs_client_shared_lib", | |
47 "//third_party/custom_tabs_client:custom_tabs_support_lib", | 44 "//third_party/custom_tabs_client:custom_tabs_support_lib", |
48 "//third_party/errorprone:chromium_errorprone", | |
49 "//third_party/haha:haha", | |
50 "//third_party/junit:hamcrest", | |
51 "//third_party/netty4:netty_all", | |
52 "//third_party/netty-tcnative:netty-tcnative", | |
53 "//third_party/robolectric:android-all-4.3_r2-robolectric-0", | |
54 "//third_party/robolectric:android-all-5.0.0_r2-robolectric-1", | |
55 "//third_party/robolectric:json-20080701", | |
56 "//third_party/robolectric:tagsoup-1.2", | |
57 "//third_party/robolectric:shadows-core-3.0-18", | |
58 "//third_party/robolectric:shadows-core-3.0-21", | |
59 "//third_party/robolectric:shadows-multidex-3.0", | |
60 ] | 45 ] |
61 | 46 |
62 # Targets that match the whitelist but are not actually java targets. | 47 # Targets that match the whitelist but are not actually java targets. |
63 _java_target_blacklist = [ | 48 _java_target_blacklist = [ |
64 "//chrome:packed_resources", | 49 "//chrome:packed_resources", |
65 "//remoting/android:remoting_android_raw_resources", | 50 "//remoting/android:remoting_android_raw_resources", |
66 "*:*_unpack_aar", | 51 "*:*_unpack_aar", |
67 ] | 52 ] |
68 | 53 |
69 # Write the target's .build_config file. This is a json file that contains a | 54 # Write the target's .build_config file. This is a json file that contains a |
70 # dictionary of information about how to build this target (things that | 55 # dictionary of information about how to build this target (things that |
71 # require knowledge about this target's dependencies and cannot be calculated | 56 # require knowledge about this target's dependencies and cannot be calculated |
72 # at gn-time). There is a special syntax to add a value in that dictionary to | 57 # at gn-time). There is a special syntax to add a value in that dictionary to |
73 # an action/action_foreachs args: | 58 # an action/action_foreachs args: |
74 # --python-arg=@FileArg($rebased_build_config_path:key0:key1) | 59 # --python-arg=@FileArg($rebased_build_config_path:key0:key1) |
75 # At runtime, such an arg will be replaced by the value in the build_config. | 60 # At runtime, such an arg will be replaced by the value in the build_config. |
76 # See build/android/gyp/write_build_config.py and | 61 # See build/android/gyp/write_build_config.py and |
77 # build/android/gyp/util/build_utils.py:ExpandFileArgs | 62 # build/android/gyp/util/build_utils.py:ExpandFileArgs |
78 template("write_build_config") { | 63 template("write_build_config") { |
79 type = invoker.type | 64 type = invoker.type |
| 65 _is_prebuilt_binary = |
| 66 defined(invoker.is_prebuilt_binary) && invoker.is_prebuilt_binary |
80 | 67 |
81 # Don't need to enforce naming scheme for these targets since we never | 68 # Don't need to enforce naming scheme for these targets since we never |
82 # consider them in dependency chains. | 69 # consider them in dependency chains. |
83 if (type != "android_apk" && type != "java_binary" && | 70 if (!_is_prebuilt_binary && type != "android_apk" && type != "java_binary" && |
84 type != "resource_rewriter") { | 71 type != "resource_rewriter") { |
85 set_sources_assignment_filter(_java_target_whitelist) | 72 set_sources_assignment_filter(_java_target_whitelist) |
86 _parent_invoker = invoker.invoker | 73 _parent_invoker = invoker.invoker |
87 _target_label = | 74 _target_label = |
88 get_label_info(":${_parent_invoker.target_name}", "label_no_toolchain") | 75 get_label_info(":${_parent_invoker.target_name}", "label_no_toolchain") |
89 sources = [ | 76 sources = [ |
90 _target_label, | 77 _target_label, |
91 ] | 78 ] |
92 if (sources != []) { | 79 if (sources != []) { |
93 set_sources_assignment_filter(_java_target_blacklist) | 80 set_sources_assignment_filter(_java_target_blacklist) |
(...skipping 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1768 | 1755 |
1769 _build_config_target_name = "${_template_name}__build_config" | 1756 _build_config_target_name = "${_template_name}__build_config" |
1770 _process_jar_target_name = "${_template_name}__process_jar" | 1757 _process_jar_target_name = "${_template_name}__process_jar" |
1771 _ijar_target_name = "${_template_name}__ijar" | 1758 _ijar_target_name = "${_template_name}__ijar" |
1772 if (_supports_android) { | 1759 if (_supports_android) { |
1773 _dex_target_name = "${_template_name}__dex" | 1760 _dex_target_name = "${_template_name}__dex" |
1774 } | 1761 } |
1775 | 1762 |
1776 write_build_config(_build_config_target_name) { | 1763 write_build_config(_build_config_target_name) { |
1777 type = "java_prebuilt" | 1764 type = "java_prebuilt" |
| 1765 is_prebuilt_binary = defined(invoker.main_class) |
1778 forward_variables_from(invoker, | 1766 forward_variables_from(invoker, |
1779 [ | 1767 [ |
1780 "input_jars_paths", | 1768 "input_jars_paths", |
1781 "proguard_configs", | 1769 "proguard_configs", |
1782 ]) | 1770 ]) |
1783 supports_android = _supports_android | 1771 supports_android = _supports_android |
1784 requires_android = | 1772 requires_android = |
1785 defined(invoker.requires_android) && invoker.requires_android | 1773 defined(invoker.requires_android) && invoker.requires_android |
1786 | 1774 |
1787 if (defined(invoker.deps)) { | 1775 if (defined(invoker.deps)) { |
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2703 rebase_path(root_build_dir, root_build_dir), | 2691 rebase_path(root_build_dir, root_build_dir), |
2704 "--packed-libraries-dir", | 2692 "--packed-libraries-dir", |
2705 rebase_path(_packed_libraries_dir, root_build_dir), | 2693 rebase_path(_packed_libraries_dir, root_build_dir), |
2706 "--libraries=${invoker.libraries_filearg}", | 2694 "--libraries=${invoker.libraries_filearg}", |
2707 "--filelistjson", | 2695 "--filelistjson", |
2708 rebase_path(invoker.file_list_json, root_build_dir), | 2696 rebase_path(invoker.file_list_json, root_build_dir), |
2709 ] | 2697 ] |
2710 } | 2698 } |
2711 } | 2699 } |
2712 } | 2700 } |
OLD | NEW |