gn2bp: ignore copy targets in create_modules_from_target
This is a hack to get the script to run successfully for //base:base.
Test: //base:base
Change-Id: Ib1741058242b4ca8e5504c3fe0eac6cec9ea2023
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index 036a20b..2032207 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -745,6 +745,12 @@
module = create_gen_version_module(blueprint, target, bp_module_name)
else:
module = create_action_module(blueprint, target)
+ elif target.type == 'copy':
+ # TODO: careful now! copy targets are not supported yet, but this will stop
+ # traversing the dependency tree. For //base:base, this is not a big
+ # problem as libicu contains the only copy target which happens to be a
+ # leaf node.
+ return None
else:
raise Error('Unknown target %s (%s)' % (target.name, target.type))