gn2bp: Add script to the tool_files in get_tool_files
Test: ./update_results.sh
Change-Id: I7dd6547aea68bfd7510e91ebcc36e91c10f80ccb
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index 17b5845..176e65f 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -761,7 +761,10 @@
# soong only supports source files inside srcs, non-source files are added as
# tool_files dependency.
files = self.target.sources.union(self.target.inputs)
- return {gn_utils.label_to_path(file) for file in files if not is_supported_source_file(file)}
+ tool_files = {gn_utils.label_to_path(file)
+ for file in files if not is_supported_source_file(file)}
+ tool_files.add(gn_utils.label_to_path(self.target.script))
+ return tool_files
def _sanitize_args(self):
# Handle passing parameters via response file by piping them into the script
@@ -969,9 +972,6 @@
# android_chrome_version.py is not specified in anywhere but version.py imports this file
module.tool_files.add('build/util/android_chrome_version.py')
- script = gn_utils.label_to_path(target.script)
- module.tool_files.add(script)
-
blueprint.add_module(module)
return module