gn2bp: Add script to the tool_files in get_tool_files am: 6997586226
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2327488
Change-Id: Ie9dd46181d077aefb286650d0d80479820dd55a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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