diff options
author | svidyuk <svidyuk@yandex-team.com> | 2025-01-29 07:18:43 +0300 |
---|---|---|
committer | svidyuk <svidyuk@yandex-team.com> | 2025-01-29 07:36:34 +0300 |
commit | 113dd3cb3952d8d3b5fdec92013800f2a05e242c (patch) | |
tree | 52fd52d45782c8b32059166dd15b0553b128b7fd /build/scripts/prepare_jar_build.py | |
parent | f562d654c2fe8cfc407e8a6e596474c3975a2204 (diff) | |
download | ydb-113dd3cb3952d8d3b5fdec92013800f2a05e242c.tar.gz |
Migrate DLL_JAVA to JAR_LIBRARY module
commit_hash:748b6900bfb14824d834071a0ab51d873960eae6
Diffstat (limited to 'build/scripts/prepare_jar_build.py')
-rw-r--r-- | build/scripts/prepare_jar_build.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/build/scripts/prepare_jar_build.py b/build/scripts/prepare_jar_build.py index 7c7a47fab1..f2db5544d6 100644 --- a/build/scripts/prepare_jar_build.py +++ b/build/scripts/prepare_jar_build.py @@ -1,5 +1,6 @@ import os import sys +import shutil import argparse # Explicitly enable local imports @@ -154,10 +155,15 @@ def main(): with_kotlin=True if args.kotlin else False, with_coverage=True if args.coverage else False) + jsrcs_dir = None for src in src_sorter.sort_args(remaining_args): if src.endswith(".gentar"): unpack_dir(src, os.path.dirname(src)) continue + if src.endswith(".jsrc"): + jsrcs_dir = os.path.join(args.bindir, 'jsrcs') + unpack_dir(src, jsrcs_dir) + continue src_consumer.consume(src, src_sorter) @@ -173,6 +179,25 @@ def main(): for rargs in resolve_args: resolve.cli_main(rargs, force_skip_source_jars=not args.with_sources_jar) + if jsrcs_dir is not None: + resolve.resolve_sources_and_fill_filelists( + directory=jsrcs_dir, + sources_file=args.java, + resources_file=os.path.join(args.bindir, 'default.res.txt'), + kotlin_sources_file=args.kotlin if args.kotlin else None, + include_patterns=['**/*'], + exclude_patterns=[], + resolve_kotlin=True if args.kotlin else False, + append=True, + all_resources=False, + ) + if args.with_sources_jar: + # TODO ugly hack here. Once jar directory preparation will be handled in a single script + # sources copying should use common API here as well. Current "common API" is to populate + # file with files to be copied by another script. It can't be uses here since there is no + # way to send filelist to that external script from current point in code + shutil.copytree(jsrcs_dir, os.path.join(args.bindir, 'src'), dirs_exist_ok=True) + return 0 |