gn2bp: rename _sanitize_dir to _sanitize_filepath
Test: none Change-Id: I8f6d7e92df94c72ff07eab23e81ac45aa2306bdb
This commit is contained in:
@@ -689,7 +689,7 @@ class BaseActionSanitizer():
|
|||||||
|
|
||||||
# applies common directory transformation that *should* be universally applicable.
|
# applies common directory transformation that *should* be universally applicable.
|
||||||
# TODO: verify if it actually *is* universally applicable.
|
# TODO: verify if it actually *is* universally applicable.
|
||||||
def _sanitize_dir(self, filepath):
|
def _sanitize_filepath(self, filepath):
|
||||||
# Careful, order matters!
|
# Careful, order matters!
|
||||||
filepath = re.sub('^(\.\./)+', '', filepath)
|
filepath = re.sub('^(\.\./)+', '', filepath)
|
||||||
filepath = re.sub('^gen/jni_headers', '$(genDir)', filepath)
|
filepath = re.sub('^gen/jni_headers', '$(genDir)', filepath)
|
||||||
@@ -712,12 +712,12 @@ class WriteBuildFlagHeaderSanitizer(BaseActionSanitizer):
|
|||||||
|
|
||||||
class JniGeneratorSanitizer(BaseActionSanitizer):
|
class JniGeneratorSanitizer(BaseActionSanitizer):
|
||||||
def get_args(self):
|
def get_args(self):
|
||||||
self._update_value_arg('--jar_file', self._sanitize_dir)
|
self._update_value_arg('--jar_file', self._sanitize_filepath)
|
||||||
self._update_value_arg('--jar_file', self._add_location_tag)
|
self._update_value_arg('--jar_file', self._add_location_tag)
|
||||||
if self._has_arg('--jar_file'):
|
if self._has_arg('--jar_file'):
|
||||||
self._append_arg('--javap', '$$(find out/.path -name javap)')
|
self._append_arg('--javap', '$$(find out/.path -name javap)')
|
||||||
self._update_value_arg('--output_dir', self._sanitize_dir)
|
self._update_value_arg('--output_dir', self._sanitize_filepath)
|
||||||
self._update_value_arg('--includes', self._sanitize_dir)
|
self._update_value_arg('--includes', self._sanitize_filepath)
|
||||||
self._delete_arg('--prev_output_dir')
|
self._delete_arg('--prev_output_dir')
|
||||||
return super().get_args()
|
return super().get_args()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user