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/credits_tmpl.gni") | |
8 import("//remoting/android/remoting_apk_tmpl.gni") | 9 import("//remoting/android/remoting_apk_tmpl.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", |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 ] | 58 ] |
58 libs = [ | 59 libs = [ |
59 "android", | 60 "android", |
60 "OpenSLES", | 61 "OpenSLES", |
61 "EGL", | 62 "EGL", |
62 ] | 63 ] |
63 configs += [ "//remoting/build/config:enable_webrtc_remoting_client" ] | 64 configs += [ "//remoting/build/config:enable_webrtc_remoting_client" ] |
64 assert_no_deps = [ "//third_party/ffmpeg:*" ] | 65 assert_no_deps = [ "//third_party/ffmpeg:*" ] |
65 } | 66 } |
66 | 67 |
67 action("credits") { | 68 remoting_android_credits("credits") { |
68 credits_html_file = "$target_gen_dir/credits.html" | 69 gn_target = "//remoting/android:remoting_apk" |
69 script = "//tools/licenses.py" | |
70 depfile = "$target_gen_dir/$target_name.d" | |
71 credits_template = "//remoting/credits/credits.tmpl" | |
72 credits_entry_template = "//remoting/credits/credits_entry.tmpl" | |
73 inputs = [ | |
74 credits_template, | |
75 credits_entry_template, | |
76 ] | |
77 outputs = [ | |
78 credits_html_file, | |
79 ] | |
80 args = [ | |
81 "credits", | |
82 rebase_path(credits_html_file, root_build_dir), | |
83 "--file-template", | |
84 rebase_path(credits_template, root_build_dir), | |
85 "--entry-template", | |
86 rebase_path(credits_entry_template, root_build_dir), | |
87 "--depfile", | |
88 rebase_path(depfile, root_build_dir), | |
89 "--gn-target", | |
90 "//remoting/android:remoting_apk", | |
91 "--gn-out-dir", | |
92 rebase_path(root_build_dir), | |
93 ] | |
94 } | |
95 | |
96 _raw_resources_base_dir = "$target_gen_dir/remoting_android_raw_resources/res" | |
97 copy("remoting_android_raw_resources") { | |
98 _credits_html = get_label_info("//remoting/android:credits", | |
99 "target_gen_dir") + "/credits.html" | |
100 sources = [ | |
101 "//remoting/credits/credits_css.css", | |
102 "//remoting/credits/credits_js.js", | |
103 _credits_html, | |
104 ] | |
105 outputs = [ | |
106 "$_raw_resources_base_dir/raw/{{source_file_part}}", | |
107 ] | |
108 deps = [ | |
109 ":credits", | |
110 ] | |
111 } | 70 } |
112 | 71 |
113 remoting_localize("remoting_apk_manifest") { | 72 remoting_localize("remoting_apk_manifest") { |
114 sources = [ | 73 sources = [ |
115 "java/AndroidManifest.xml.jinja2", | 74 "java/AndroidManifest.xml.jinja2", |
116 ] | 75 ] |
117 locales = [ "en" ] | 76 locales = [ "en" ] |
118 variables = [ rebase_path(branding_path) ] | 77 variables = [ rebase_path(branding_path) ] |
119 output = "$root_gen_dir/remoting/android/{{source_name_part}}" | 78 output = "$root_gen_dir/remoting/android/{{source_name_part}}" |
120 } | 79 } |
121 | 80 |
122 android_resources("remoting_android_client_java_resources") { | 81 android_resources("remoting_android_client_java_resources") { |
123 custom_package = "org.chromium.chromoting" | 82 custom_package = "org.chromium.chromoting" |
124 resource_dirs = [ "java/res" ] | 83 resource_dirs = [ "java/res" ] |
125 generated_resource_dirs = [ _raw_resources_base_dir ] | 84 generated_resource_dirs = |
126 generated_resource_files = | 85 [ get_label_info(":credits_resources_raw", "target_gen_dir") + |
127 get_target_outputs(":remoting_android_raw_resources") | 86 "/credits_resources_raw/res" ] |
128 | 87 generated_resource_files = get_target_outputs(":credits_resources_raw") |
129 deps = [ | 88 deps = [ |
130 ":remoting_android_raw_resources", | 89 ":credits_resources_raw", |
agrieve
2017/03/21 02:07:13
It's a little bit bad form to depend on a generate
Lambros
2017/03/22 21:31:00
Done (added __generate to the action target)
| |
131 "//remoting/resources:strings_java", | 90 "//remoting/resources:strings_java", |
132 "//third_party/android_tools:android_support_v7_appcompat_java", | 91 "//third_party/android_tools:android_support_v7_appcompat_java", |
133 ] | 92 ] |
134 } | 93 } |
135 | 94 |
136 remoting_android_client_java_tmpl("remoting_android_client_java") { | 95 remoting_android_client_java_tmpl("remoting_android_client_java") { |
137 remoting_google_play_services_library = google_play_services_library | 96 remoting_google_play_services_library = google_play_services_library |
138 } | 97 } |
139 | 98 |
140 remoting_apk_tmpl("remoting_apk") { | 99 remoting_apk_tmpl("remoting_apk") { |
(...skipping 30 matching lines...) Expand all Loading... | |
171 "javatests/src/org/chromium/chromoting/TouchInputStrategyTest.java", | 130 "javatests/src/org/chromium/chromoting/TouchInputStrategyTest.java", |
172 "javatests/src/org/chromium/chromoting/test/util/MutableReference.java", | 131 "javatests/src/org/chromium/chromoting/test/util/MutableReference.java", |
173 ] | 132 ] |
174 deps = [ | 133 deps = [ |
175 ":remoting_android_client_java", | 134 ":remoting_android_client_java", |
176 "//base:base_java", | 135 "//base:base_java", |
177 "//base:base_java_test_support", | 136 "//base:base_java_test_support", |
178 "//third_party/android_support_test_runner:runner_java", | 137 "//third_party/android_support_test_runner:runner_java", |
179 ] | 138 ] |
180 } | 139 } |
OLD | NEW |