gn2bp: Move --sources-exclusions to JniRegistrationGeneratorSanitizer
Test: ./update_results.sh
Change-Id: I38f39ab2a3eb391fde88a2d4ef57ed1e68a9f2c9
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index 82ea24b..f72f4be 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -753,6 +753,9 @@
self._update_value_arg('--srcjar-path', self._sanitize_filepath)
self._update_value_arg('--header-path', self._sanitize_filepath)
self._set_value_arg('--sources-files', '$(genDir)/java.sources')
+ # update_jni_registration_module removes them from the srcs of the module
+ # It might be better to remove sources by '--sources-exclusions'
+ self._delete_value_arg('--sources-exclusions')
return super().get_args()
def get_action_sanitizer(target):
@@ -819,12 +822,6 @@
target.deps.clear()
target.inputs = [file for file in target.inputs if not file.startswith('//out/')]
- for i, val in enumerate(target.args):
- if val == '--sources-exclusions':
- # update_jni_registration_module removes them from the srcs of the module
- # It might be better to remove sources by '--sources-exclusions'
- target.args[i] = ''
- target.args[i + 1] = ''
elif target.script == "//net/tools/dafsa/make_dafsa.py":
# This script generates .cc files but source (registry_controlled_domain.cc) in the target that
# depends on this target includes .cc file this script generates.