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

Unified Diff: third_party/robolectric/BUILD.gn

Issue 2200413004: Pass template files explicitly to Robolectric template processor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Jbudoricks commnets Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/robolectric/template_processor/src/org/chromium/testing/robolectric/template/ProcessRobolectricTemplate.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/robolectric/BUILD.gn
diff --git a/third_party/robolectric/BUILD.gn b/third_party/robolectric/BUILD.gn
index eff434f6abc4cc3e34f1a35258fe44537b139682..4eba3000a5b93321723d83d0c69432aa233c3d88 100644
--- a/third_party/robolectric/BUILD.gn
+++ b/third_party/robolectric/BUILD.gn
@@ -531,6 +531,7 @@ java_binary("robolectric_template_processor") {
java_files = [
"template_processor/src/org/chromium/testing/robolectric/template/ProcessRobolectricTemplate.java",
"template_processor/src/org/chromium/testing/robolectric/template/ProcessTemplateArgParser.java",
+ "template_processor/src/org/chromium/testing/robolectric/template/TemplateFileInfo.java",
]
main_class =
"org.chromium.testing.robolectric.template.ProcessRobolectricTemplate"
@@ -552,24 +553,30 @@ template("shadows_core") {
_process_templates_target_name = "${target_name}__process_templates"
_processed_template_files = []
- foreach(t, _template_files) {
- _gen_dir = get_path_info(t, "gen_dir")
- _name = get_path_info(t, "name")
- _processed_template_files += [ "$_gen_dir/$api_level/$_name" ]
+ _template_file_args = []
+ foreach(template_file, _template_files) {
+ _gen_dir = get_path_info(template_file, "gen_dir")
+ _name = get_path_info(template_file, "name")
+ _output_file = "$_gen_dir/$api_level/$_name"
+ _template_file_args += [
+ "--process-file",
+ "$template_file",
+ rebase_path(_output_file, root_build_dir),
+ ]
+ _processed_template_files += [ _output_file ]
}
action(_process_templates_target_name) {
_base_template_dir = rebase_path(".", root_build_dir)
- _base_template_output_dir = rebase_path(target_gen_dir, root_build_dir)
script = "$root_build_dir/bin/robolectric_template_processor"
args = [
"--api-level",
"$api_level",
"--base-template-dir",
_base_template_dir,
- "--output-dir",
- _base_template_output_dir,
]
+ args += _template_file_args
+
inputs = _template_files
outputs = _processed_template_files
« no previous file with comments | « no previous file | third_party/robolectric/template_processor/src/org/chromium/testing/robolectric/template/ProcessRobolectricTemplate.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698