aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorsvidyuk <svidyuk@yandex-team.com>2025-01-17 06:48:25 +0300
committersvidyuk <svidyuk@yandex-team.com>2025-01-17 07:09:43 +0300
commit5cabcd1a435072368d0ffd5efc0f4a589d769622 (patch)
treed19c37a14c7a0fd31f0f03cb377109f7d3dcb13b /build
parent2f3fd95aac24e27a3b0aa2badda49db82bf36cc5 (diff)
downloadydb-5cabcd1a435072368d0ffd5efc0f4a589d769622.tar.gz
Drop more groovy support related code
commit_hash:81fec1e84eb8eab851b8f82a3ed811f8df9cbf7f
Diffstat (limited to 'build')
-rw-r--r--build/conf/java.conf4
-rw-r--r--build/plugins/java.py6
-rw-r--r--build/scripts/resolve_java_srcs.py22
3 files changed, 10 insertions, 22 deletions
diff --git a/build/conf/java.conf b/build/conf/java.conf
index 90fa5d35ca..1bc2f57d00 100644
--- a/build/conf/java.conf
+++ b/build/conf/java.conf
@@ -407,8 +407,8 @@ macro _JAVA_SRCS(RESOURCES?"yes":"no", SRCDIR=".", PACKAGE_PREFIX="", EXCLUDE[],
SET_APPEND(ALL_JAR_SOURCES --jsources ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.src.txt --resources ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.res.txt --srcdir ${quo:SRCDIR} \${input:${JAR_SRCS_GLOB}} ${pre=\$\{input\:\";suf=\"\}:FILES})
_FILL_JAR_COPY_RESOURCES_CMD(LINK_JAR_RESOURCES ${quo:SRCDIR} ${BINDIR}/cls ${PACKAGE_PREFIX} ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.res.txt)
_FILL_JAR_COPY_RESOURCES_CMD(LINK_JAR_JSOURCES ${quo:SRCDIR} ${BINDIR}/src ${PACKAGE_PREFIX} ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.src.txt)
- _FILL_JAR_GEN_SRCS(JAR_GEN_SRCS JAR $SRCDIR ${BINDIR}/cls ${BINDIR}/all-java.srclst $KT_SRCLIST ${BINDIR}/misc/all-gr-sources.txt ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.res.txt $Globs EXCLUDE $EXCLUDE)
- _FILL_JAR_GEN_SRCS(JAR_GEN_JSRCS SRC_JAR $SRCDIR ${BINDIR}/cls ${BINDIR}/all-java.srclst $KT_SRCLIST ${BINDIR}/misc/all-gr-sources.txt ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.src.txt $Globs EXCLUDE $EXCLUDE)
+ _FILL_JAR_GEN_SRCS(JAR_GEN_SRCS JAR $SRCDIR ${BINDIR}/cls ${BINDIR}/all-java.srclst $KT_SRCLIST ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.res.txt $Globs EXCLUDE $EXCLUDE)
+ _FILL_JAR_GEN_SRCS(JAR_GEN_JSRCS SRC_JAR $SRCDIR ${BINDIR}/cls ${BINDIR}/all-java.srclst $KT_SRCLIST ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.src.txt $Globs EXCLUDE $EXCLUDE)
}
# tag:java-specific
diff --git a/build/plugins/java.py b/build/plugins/java.py
index 2002d2ffa2..a424b16350 100644
--- a/build/plugins/java.py
+++ b/build/plugins/java.py
@@ -252,7 +252,7 @@ def on_fill_jar_copy_resources_cmd(unit, *args):
def on_fill_jar_gen_srcs(unit, *args):
- varname, jar_type, srcdir, base_classes_dir, java_list, kt_list, groovy_list, res_list = tuple(args[0:8])
+ varname, jar_type, srcdir, base_classes_dir, java_list, kt_list, res_list = tuple(args[0:7])
resolved_srcdir = unit.resolve_arc_path(srcdir)
if not resolved_srcdir.startswith('$') or resolved_srcdir.startswith('$S'):
return
@@ -261,8 +261,8 @@ def on_fill_jar_gen_srcs(unit, *args):
globs = args[7:exclude_pos]
excludes = args[exclude_pos + 1 :]
var = unit.get(varname)
- var += ' && ${{cwd:BINDIR}} $YMAKE_PYTHON ${{input:"build/scripts/resolve_java_srcs.py"}} --append -d {} -s {} -k {} -g {} -r {} --include-patterns {}'.format(
- srcdir, java_list, kt_list, groovy_list, res_list, ' '.join(globs)
+ var += ' && ${{cwd:BINDIR}} $YMAKE_PYTHON ${{input:"build/scripts/resolve_java_srcs.py"}} --append -d {} -s {} -k {} -r {} --include-patterns {}'.format(
+ srcdir, java_list, kt_list, res_list, ' '.join(globs)
)
if jar_type == 'SRC_JAR':
var += ' --all-resources'
diff --git a/build/scripts/resolve_java_srcs.py b/build/scripts/resolve_java_srcs.py
index 8d3d6285e7..446bb55476 100644
--- a/build/scripts/resolve_java_srcs.py
+++ b/build/scripts/resolve_java_srcs.py
@@ -30,10 +30,8 @@ def pattern_to_regexp(p):
)
-def resolve_java_srcs(
- srcdir, include_patterns, exclude_patterns, all_resources, resolve_kotlin=False, resolve_groovy=False
-):
- result = {'java': [], 'not_java': [], 'kotlin': [], 'groovy': []}
+def resolve_java_srcs(srcdir, include_patterns, exclude_patterns, all_resources, resolve_kotlin=False):
+ result = {'java': [], 'not_java': [], 'kotlin': []}
include_patterns_normal, include_patterns_hidden, exclude_patterns_normal, exclude_patterns_hidden = [], [], [], []
for vis, hid, patterns in (
(include_patterns_normal, include_patterns_hidden, include_patterns),
@@ -69,19 +67,17 @@ def resolve_java_srcs(
for inc_re in inc_patterns:
if inc_re.match(f):
s = os.path.normpath(f[1:])
- if all_resources or not (f.endswith('.java') or f.endswith('.kt') or f.endswith('.groovy')):
+ if all_resources or not (f.endswith('.java') or f.endswith('.kt')):
result['not_java'].append(s)
elif f.endswith('.java'):
result['java'].append(os.path.join(srcdir, s))
elif f.endswith('.kt') and resolve_kotlin:
result['kotlin'].append(os.path.join(srcdir, s))
- elif f.endswith('.groovy') and resolve_groovy:
- result['groovy'].append(os.path.join(srcdir, s))
else:
result['not_java'].append(s)
break
- return sorted(result['java']), sorted(result['not_java']), sorted(result['kotlin']), sorted(result['groovy'])
+ return sorted(result['java']), sorted(result['not_java']), sorted(result['kotlin'])
def do_it(
@@ -89,24 +85,18 @@ def do_it(
sources_file,
resources_file,
kotlin_sources_file,
- groovy_sources_file,
include_patterns,
exclude_patterns,
resolve_kotlin,
- resolve_groovy,
append,
all_resources,
):
- j, r, k, g = resolve_java_srcs(
- directory, include_patterns, exclude_patterns, all_resources, resolve_kotlin, resolve_groovy
- )
+ j, r, k = resolve_java_srcs(directory, include_patterns, exclude_patterns, all_resources, resolve_kotlin)
mode = 'a' if append else 'w'
open(sources_file, mode).writelines(i + '\n' for i in j)
open(resources_file, mode).writelines(i + '\n' for i in r)
if kotlin_sources_file:
open(kotlin_sources_file, mode).writelines(i + '\n' for i in k + j)
- if groovy_sources_file:
- open(groovy_sources_file, mode).writelines(i + '\n' for i in g + j)
if __name__ == '__main__':
@@ -115,11 +105,9 @@ if __name__ == '__main__':
parser.add_argument('-s', '--sources-file', required=True)
parser.add_argument('-r', '--resources-file', required=True)
parser.add_argument('-k', '--kotlin-sources-file', default=None)
- parser.add_argument('-g', '--groovy-sources-file', default=None)
parser.add_argument('--append', action='store_true', default=False)
parser.add_argument('--all-resources', action='store_true', default=False)
parser.add_argument('--resolve-kotlin', action='store_true', default=False)
- parser.add_argument('--resolve-groovy', action='store_true', default=False)
parser.add_argument('--include-patterns', nargs='*', default=[])
parser.add_argument('--exclude-patterns', nargs='*', default=[])
args = parser.parse_args()