Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: mojo/public/mojo_application.gni

Issue 898853006: Java content handler for Android. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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("mojo.gni") 5 import("mojo.gni")
6 import("mojo_sdk.gni") 6 import("mojo_sdk.gni")
7 7
8 # Generate a binary mojo application.The parameters of this template are those 8 # Generate a binary mojo application.The parameters of this template are those
9 # of a shared library. 9 # of a shared library.
10 template("mojo_native_application") { 10 template("mojo_native_application") {
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 if (is_android) { 155 if (is_android) {
156 # Declares an Android Mojo application consisting of an .so file and a 156 # Declares an Android Mojo application consisting of an .so file and a
157 # corresponding .dex.jar file. 157 # corresponding .dex.jar file.
158 # 158 #
159 # Variables: 159 # Variables:
160 # input_so: the .so file to bundle 160 # input_so: the .so file to bundle
161 # input_dex_jar: the .dex.jar file to bundle 161 # input_dex_jar: the .dex.jar file to bundle
162 # output_name (optional): override for the output file name 162 # output_name (optional): override for the output file name
163 template("mojo_android_application") { 163 template("mojo_android_application") {
164 assert(defined(invoker.input_so))
qsr 2015/02/05 16:50:07 What is the use case where you do not have an inpu
etiennej 2015/02/06 16:22:29 None. Actually, I merged the two new templates as
165 assert(defined(invoker.input_dex_jar)) 164 assert(defined(invoker.input_dex_jar))
166 165
167 zip_action_name = "${target_name}_zip" 166 zip_action_name = "${target_name}_zip"
168 zip_action_output = "$target_gen_dir/${target_name}.zip" 167 zip_action_output = "$target_gen_dir/${target_name}.zip"
169 action(zip_action_name) { 168 action(zip_action_name) {
170 script = "//build/android/gn/zip.py" 169 script = "//build/android/gn/zip.py"
171 170
172 inputs = [ 171 inputs = [
173 invoker.input_so, 172 invoker.input_so,
174 invoker.input_dex_jar, 173 invoker.input_dex_jar,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 207
209 rebase_input = rebase_path(input, root_build_dir) 208 rebase_input = rebase_path(input, root_build_dir)
210 rebase_output = rebase_path(output, root_build_dir) 209 rebase_output = rebase_path(output, root_build_dir)
211 args = [ 210 args = [
212 "--input=$rebase_input", 211 "--input=$rebase_input",
213 "--output=$rebase_output", 212 "--output=$rebase_output",
214 "--line=#!mojo mojo:android_handler", 213 "--line=#!mojo mojo:android_handler",
215 ] 214 ]
216 } 215 }
217 } 216 }
217
218 template("mojo_android_java_application") {
219 assert(defined(invoker.input_dex_jar))
220
221 if (defined(invoker.output_name)) {
222 mojo_output = "$root_out_dir/" + invoker.output_name + ".mojo"
223 } else {
224 mojo_output = "$root_out_dir/" + target_name + ".mojo"
225 }
226
227 action(target_name) {
228 script = rebase_path("mojo/public/tools/prepend.py", ".", mojo_root)
229
230 input = invoker.input_dex_jar
231 inputs = [
232 input,
233 ]
234
235 output = mojo_output
236 outputs = [
237 output,
238 ]
239
240 rebase_input = rebase_path(input, root_build_dir)
241 rebase_output = rebase_path(output, root_build_dir)
242 args = [
243 "--input=$rebase_input",
244 "--output=$rebase_output",
245 "--line=#!mojo mojo:java_handler",
246 ]
247 }
248 }
218 } 249 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698