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