aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/resolve_java_srcs.py
diff options
context:
space:
mode:
authorDmitry Kopylov <kopylovd@gmail.com>2022-02-10 16:48:18 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:18 +0300
commit7230275728d34873cba1ba78bb68669b0c5faa31 (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /build/scripts/resolve_java_srcs.py
parentb2f5101486cc0de2e979c8ba9ada2109785bf5fd (diff)
downloadydb-7230275728d34873cba1ba78bb68669b0c5faa31.tar.gz
Restoring authorship annotation for Dmitry Kopylov <kopylovd@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'build/scripts/resolve_java_srcs.py')
-rw-r--r--build/scripts/resolve_java_srcs.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/build/scripts/resolve_java_srcs.py b/build/scripts/resolve_java_srcs.py
index bd50c96af9..a2e6c20012 100644
--- a/build/scripts/resolve_java_srcs.py
+++ b/build/scripts/resolve_java_srcs.py
@@ -17,15 +17,15 @@ def list_all_files(directory, prefix='/', hidden_files=False):
def pattern_to_regexp(p):
return '^' + \
('/' if not p.startswith('**') else '') + \
- re.escape(p).replace(
- r'\*\*\/', '[_DIR_]'
- ).replace(
- r'\*', '[_FILE_]'
- ).replace(
- '[_DIR_]', '(.*/)?'
- ).replace(
- '[_FILE_]', '([^/]*)'
- ) + '$'
+ re.escape(p).replace(
+ r'\*\*\/', '[_DIR_]'
+ ).replace(
+ r'\*', '[_FILE_]'
+ ).replace(
+ '[_DIR_]', '(.*/)?'
+ ).replace(
+ '[_FILE_]', '([^/]*)'
+ ) + '$'
def resolve_java_srcs(srcdir, include_patterns, exclude_patterns, all_resources, resolve_kotlin=False, resolve_groovy=False):
@@ -87,7 +87,7 @@ def do_it(directory, sources_file, resources_file, kotlin_sources_file, groovy_s
if groovy_sources_file:
open(groovy_sources_file, mode).writelines(i + '\n' for i in g + j)
-
+
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('-d', '--directory', required=True)