OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 import("//build/config/android/rules.gni") | 6 import("//build/config/android/rules.gni") |
7 import("//remoting/android/client_java_tmpl.gni") | 7 import("//remoting/android/client_java_tmpl.gni") |
8 import("//remoting/android/remoting_apk_tmpl.gni") | 8 import("//remoting/android/remoting_apk_tmpl.gni") |
| 9 import("//remoting/credits/credits.gni") |
9 import("//remoting/remoting_options.gni") | 10 import("//remoting/remoting_options.gni") |
10 import("//remoting/tools/build/remoting_localize.gni") | 11 import("//remoting/tools/build/remoting_localize.gni") |
11 | 12 |
12 generate_jni("jni_headers") { | 13 generate_jni("jni_headers") { |
13 sources = [ | 14 sources = [ |
14 "java/src/org/chromium/chromoting/jni/Client.java", | 15 "java/src/org/chromium/chromoting/jni/Client.java", |
15 "java/src/org/chromium/chromoting/jni/GlDisplay.java", | 16 "java/src/org/chromium/chromoting/jni/GlDisplay.java", |
16 "java/src/org/chromium/chromoting/jni/JniInterface.java", | 17 "java/src/org/chromium/chromoting/jni/JniInterface.java", |
17 "java/src/org/chromium/chromoting/jni/TouchEventData.java", | 18 "java/src/org/chromium/chromoting/jni/TouchEventData.java", |
18 ] | 19 ] |
19 jni_package = "remoting" | 20 jni_package = "remoting" |
20 } | 21 } |
21 | 22 |
22 action("credits") { | 23 _raw_resources_base_dir = "$target_gen_dir/credits_resources_raw/res" |
23 credits_html_file = "$target_gen_dir/credits.html" | |
24 script = "//tools/licenses.py" | |
25 depfile = "$target_gen_dir/$target_name.d" | |
26 credits_template = "//remoting/credits/credits.tmpl" | |
27 credits_entry_template = "//remoting/credits/credits_entry.tmpl" | |
28 inputs = [ | |
29 credits_template, | |
30 credits_entry_template, | |
31 ] | |
32 outputs = [ | |
33 credits_html_file, | |
34 ] | |
35 args = [ | |
36 "credits", | |
37 rebase_path(credits_html_file, root_build_dir), | |
38 "--file-template", | |
39 rebase_path(credits_template, root_build_dir), | |
40 "--entry-template", | |
41 rebase_path(credits_entry_template, root_build_dir), | |
42 "--depfile", | |
43 rebase_path(depfile, root_build_dir), | |
44 "--gn-target", | |
45 "//remoting/android:remoting_apk", | |
46 "--gn-out-dir", | |
47 rebase_path(root_build_dir), | |
48 ] | |
49 } | |
50 | 24 |
51 _raw_resources_base_dir = "$target_gen_dir/remoting_android_raw_resources/res" | 25 # The target is named this way, instead of "..._raw_resources", specifically |
52 copy("remoting_android_raw_resources") { | 26 # to avoid matching any of the _java_target_whitelist items in |
53 _credits_html = get_label_info("//remoting/android:credits", | 27 # build/config/android/internal_rules.gni |
54 "target_gen_dir") + "/credits.html" | 28 remoting_credits("credits_resources_raw") { |
55 sources = [ | 29 credits_gen_dir = "$_raw_resources_base_dir/raw" |
56 "//remoting/credits/credits_css.css", | 30 gn_target = "//remoting/android:remoting_apk" |
57 "//remoting/credits/credits_js.js", | |
58 _credits_html, | |
59 ] | |
60 outputs = [ | |
61 "$_raw_resources_base_dir/raw/{{source_file_part}}", | |
62 ] | |
63 deps = [ | |
64 ":credits", | |
65 ] | |
66 } | 31 } |
67 | 32 |
68 remoting_localize("remoting_apk_manifest") { | 33 remoting_localize("remoting_apk_manifest") { |
69 sources = [ | 34 sources = [ |
70 "java/AndroidManifest.xml.jinja2", | 35 "java/AndroidManifest.xml.jinja2", |
71 ] | 36 ] |
72 locales = [ "en" ] | 37 locales = [ "en" ] |
73 variables = [ rebase_path(branding_path) ] | 38 variables = [ rebase_path(branding_path) ] |
74 output = "$root_gen_dir/remoting/android/{{source_name_part}}" | 39 output = "$root_gen_dir/remoting/android/{{source_name_part}}" |
75 } | 40 } |
76 | 41 |
77 android_resources("remoting_android_client_java_resources") { | 42 android_resources("remoting_android_client_java_resources") { |
78 custom_package = "org.chromium.chromoting" | 43 custom_package = "org.chromium.chromoting" |
79 resource_dirs = [ "java/res" ] | 44 resource_dirs = [ "java/res" ] |
80 generated_resource_dirs = [ _raw_resources_base_dir ] | 45 generated_resource_dirs = [ _raw_resources_base_dir ] |
81 generated_resource_files = | 46 generated_resource_files = get_target_outputs(":credits_resources_raw") |
82 get_target_outputs(":remoting_android_raw_resources") | |
83 | |
84 deps = [ | 47 deps = [ |
85 ":remoting_android_raw_resources", | 48 ":credits_resources_raw", |
86 "//remoting/resources:strings_java", | 49 "//remoting/resources:strings_java", |
87 "//third_party/android_tools:android_support_v7_appcompat_java", | 50 "//third_party/android_tools:android_support_v7_appcompat_java", |
88 ] | 51 ] |
89 } | 52 } |
90 | 53 |
91 remoting_android_client_java_tmpl("remoting_android_client_java") { | 54 remoting_android_client_java_tmpl("remoting_android_client_java") { |
92 remoting_google_play_services_library = google_play_services_library | 55 remoting_google_play_services_library = google_play_services_library |
93 } | 56 } |
94 | 57 |
95 remoting_apk_tmpl("remoting_apk") { | 58 remoting_apk_tmpl("remoting_apk") { |
(...skipping 30 matching lines...) Expand all Loading... |
126 "javatests/src/org/chromium/chromoting/TouchInputStrategyTest.java", | 89 "javatests/src/org/chromium/chromoting/TouchInputStrategyTest.java", |
127 "javatests/src/org/chromium/chromoting/test/util/MutableReference.java", | 90 "javatests/src/org/chromium/chromoting/test/util/MutableReference.java", |
128 ] | 91 ] |
129 deps = [ | 92 deps = [ |
130 ":remoting_android_client_java", | 93 ":remoting_android_client_java", |
131 "//base:base_java", | 94 "//base:base_java", |
132 "//base:base_java_test_support", | 95 "//base:base_java_test_support", |
133 "//third_party/android_support_test_runner:runner_java", | 96 "//third_party/android_support_test_runner:runner_java", |
134 ] | 97 ] |
135 } | 98 } |
OLD | NEW |