Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 # Generate Android credits HTML file, based on the third-party dependencies of | |
| 6 # a provided GN target. | |
| 7 # Parameters: | |
| 8 # gn_target: The target whose dependencies should be listed in the credits. | |
| 9 template("remoting_android_credits") { | |
| 10 action(target_name) { | |
| 11 _credits_html_file = "$target_gen_dir/credits.html" | |
|
agrieve
2017/03/21 02:07:13
unintuitively, $target_gen_dir == "gen/remoting/an
Lambros
2017/03/22 21:31:00
Done.
| |
| 12 _credits_template = "//remoting/credits/credits.tmpl" | |
| 13 _credits_entry_template = "//remoting/credits/credits_entry.tmpl" | |
| 14 script = "//tools/licenses.py" | |
| 15 depfile = "$target_gen_dir/$target_name.d" | |
| 16 inputs = [ | |
| 17 _credits_template, | |
| 18 _credits_entry_template, | |
| 19 ] | |
| 20 outputs = [ | |
| 21 _credits_html_file, | |
| 22 ] | |
| 23 args = [ | |
| 24 "credits", | |
| 25 rebase_path(_credits_html_file, root_build_dir), | |
| 26 "--file-template", | |
| 27 rebase_path(_credits_template, root_build_dir), | |
| 28 "--entry-template", | |
| 29 rebase_path(_credits_entry_template, root_build_dir), | |
| 30 "--depfile", | |
| 31 rebase_path(depfile, root_build_dir), | |
| 32 "--gn-target", | |
| 33 invoker.gn_target, | |
| 34 "--gn-out-dir", | |
| 35 rebase_path(root_build_dir), | |
| 36 ] | |
| 37 } | |
| 38 | |
| 39 # Copies the generated HTML and the source CSS/JS, into a new directory for | |
| 40 # Android resource processing. | |
| 41 # The target is named this way, instead of "..._raw_resources", specifically | |
| 42 # to avoid matching any of the _java_target_whitelist items in | |
| 43 # build/config/android/internal_rules.gni | |
| 44 copy(target_name + "_resources_raw") { | |
| 45 _copy_target_name = target_name + "_resources_raw" | |
|
agrieve
2017/03/21 02:07:13
I think this will evaluate to "credits_resources_r
Lambros
2017/03/22 21:31:00
In my testing, this doesn't seem to be the case. t
| |
| 46 sources = [ | |
| 47 "//remoting/credits/credits_css.css", | |
| 48 "//remoting/credits/credits_js.js", | |
| 49 ] + get_target_outputs(":$target_name") | |
|
agrieve
2017/03/21 02:07:13
Might likewise be an issue here.
Lambros
2017/03/22 21:31:00
Same here.
| |
| 50 outputs = [ | |
| 51 "$target_gen_dir/${_copy_target_name}/res/raw/{{source_file_part}}", | |
| 52 ] | |
| 53 deps = [ | |
| 54 ":$target_name", | |
| 55 ] | |
| 56 } | |
| 57 } | |
| OLD | NEW |