diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-11-20 11:14:58 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-11-20 11:14:58 +0000 |
commit | 31773f157bf8164364649b5f470f52dece0a4317 (patch) | |
tree | 33d0f7eef45303ab68cf08ab381ce5e5e36c5240 /build/conf/java.conf | |
parent | 2c7938962d8689e175574fc1e817c05049f27905 (diff) | |
parent | eff600952d5dfe17942f38f510a8ac2b203bb3a5 (diff) | |
download | ydb-31773f157bf8164364649b5f470f52dece0a4317.tar.gz |
Merge branch 'rightlib' into mergelibs-241120-1113
Diffstat (limited to 'build/conf/java.conf')
-rw-r--r-- | build/conf/java.conf | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/build/conf/java.conf b/build/conf/java.conf index d029f6a379..02f5e25af2 100644 --- a/build/conf/java.conf +++ b/build/conf/java.conf @@ -78,20 +78,17 @@ multimodule JAVA_PROGRAM { } _PROCESSOR_CLASSES_VALUE= -_PROCESSOR_CLASSES_SEM= macro PROCESSOR_CLASSES(Classes...) { SET_APPEND(_PROCESSOR_CLASSES_VALUE $Classes) - SET_APPEND(_PROCESSOR_CLASSES_SEM && java-apclasses $Classes) } -_AUTO_SERVICE_SEM= macro AUTO_SERVICE(Ver) { USE_ANNOTATION_PROCESSOR(contrib/java/com/google/auto/service/auto-service/${Ver}) + # TODO Remove PEERDIR - old AP mechanic PEERDIR(contrib/java/com/google/auto/service/auto-service-annotations/${Ver}) - SET(_AUTO_SERVICE_SEM && java-apautoservice $Ver) } -_BUILD_JAVA_ANNOTATION_PROCESSOR_SEM=$BUILD_JAR_SEM $_PROCESSOR_CLASSES_SEM $_AUTO_SERVICE_SEM +_BUILD_JAVA_ANNOTATION_PROCESSOR_SEM=$BUILD_JAR_SEM ### @usage: JAVA_ANNOTATION_PROCESSOR() ### @@ -296,13 +293,11 @@ multimodule JTEST_FOR { } } -# TODO Something for using tool in RUN_JAVA_PROGRAM -_SEM_JAR_RUNNABLE= multimodule JAVA_CONTRIB_PROGRAM { module JAR_RUNNABLE: _JAR_RUNNABLE { .IGNORED=JAVA_SRCS RUN_JAR_PROGRAM RUN_JAVA_PROGRAM JAR_RESOURCE SRC_RESOURCE LOCAL_JAR .PEERDIRSELF=JAR_COMPILATION - .SEM=_SEM_JAR_RUNNABLE + .SEM=IGNORED SET(MODULE_TYPE JAVA_PROGRAM) ENABLE(DISABLE_SCRIPTGEN) @@ -375,7 +370,7 @@ module EXTERNAL_JAVA_LIBRARY: _BASE_UNIT { MAVEN_EXPORT_COORDS_GLOBAL=$MAVEN_EXPORT_GROUP_ID:${MODULE_PREFIX}${REALPRJNAME}:${MAVEN_EXPORT_VERSION}: } - PEERDIR_TAGS=JAVA JAVA_PROTO JAVA_FBS JAVA_IDL PACKAGE_UNION + PEERDIR_TAGS=JAVA JAVA_PROTO JAVA_PROTO_FROM_SCHEMA JAVA_FBS JAVA_IDL PACKAGE_UNION HAS_MANAGEABLE_PEERS=yes DYNAMIC_LINK=yes _PROTO_CMDLINE=$_JAVA_PROTO_CMDLINE @@ -526,23 +521,20 @@ macro _JAR_ANN_PROC_OPTS(Classes...) { } # tag:java-specific -_USE_ANNOTATION_PROCESSOR_TOOL= +_USE_ANNOTATION_PROCESSOR_PATH= +_USE_ANNOTATION_PROCESSOR_OPT= _USE_ANNOTATION_PROCESSOR_SEM= ### @usage: USE_ANNOTATION_PROCESSOR(Path) ### ### Used to specify annotation processor for building JAVA_PROGRAM() and JAVA_LIBRARY(). macro USE_ANNOTATION_PROCESSOR(Path) { - SET(_USE_ANNOTATION_PROCESSOR_TOOL $Path) - SET(_USE_ANNOTATION_PROCESSOR_SEM && use_annotation_processor $Path) + SET(_USE_ANNOTATION_PROCESSOR_PATH $Path) } -when ($_USE_ANNOTATION_PROCESSOR_TOOL != "") { - _USE_ANNOTATION_PROCESSOR_CMD=${tool:_USE_ANNOTATION_PROCESSOR_TOOL} - _USE_ANNOTATION_PROCESSOR_OPT=${pre=-processorpath "@";suf=.cplst:_USE_ANNOTATION_PROCESSOR_CMD} -} -otherwise { - _USE_ANNOTATION_PROCESSOR_CMD= - _USE_ANNOTATION_PROCESSOR_OPT= +when ($_USE_ANNOTATION_PROCESSOR_PATH != "") { + _USE_ANNOTATION_PROCESSOR_TOOL = ${tool:_USE_ANNOTATION_PROCESSOR_PATH} + _USE_ANNOTATION_PROCESSOR_OPT += ${pre=-processorpath "@";suf=.cplst:_USE_ANNOTATION_PROCESSOR_TOOL} + _USE_ANNOTATION_PROCESSOR_SEM += && use_annotation_processor $_USE_ANNOTATION_PROCESSOR_PATH/${nopath:_USE_ANNOTATION_PROCESSOR_TOOL} } # tag:java-specific @@ -563,7 +555,7 @@ module _JAR_BASE: _BARE_UNIT { SET(MODULE_TAG JAVA) - PEERDIR_TAGS=JAVA JAVA_PROTO JAVA_FBS JAVA_IDL DLL JAR_COMPILATION __EMPTY__ RESOURCE_LIB + PEERDIR_TAGS=JAVA JAVA_PROTO JAVA_PROTO_FROM_SCHEMA JAVA_FBS JAVA_IDL DLL JAR_COMPILATION __EMPTY__ RESOURCE_LIB HAS_MANAGEABLE_PEERS=yes DYNAMIC_LINK=yes @@ -1184,7 +1176,7 @@ module JAR_LIBRARY: _COMPILABLE_JAR_BASE { # tag:java-specific _SCRIPTGEN_FLAGS= macro _GEN_JAVA_SCRIPT_IMPL(Out, Template, Props...) { - .CMD=$SCRIPTGEN_RESOURCE_GLOBAL/scriptgen --java $JDK_RESOURCE/bin/java --output ${output:Out} --template ${input:Template} ${_SCRIPTGEN_FLAGS} -D JAR_NAME=${REALPRJNAME}.jar -D CLASSPATH=${nopath;join;ext=.jar;pre="::":MANAGED_PEERS_CLOSURE} -D PROJECT_DIR=${MODDIR} -D JAR_BASENAME=${REALPRJNAME} $Props + .CMD=$SCRIPTGEN_RESOURCE_GLOBAL/scriptgen --java $JDK_RESOURCE/bin/java --output ${output:Out} --template ${input:Template} ${_SCRIPTGEN_FLAGS} -D JAR_NAME=${REALPRJNAME}.jar -D CLASSPATH=${nopath;join;ext=.jar;pre="::":MANAGED_PEERS_CLOSURE} -D PROJECT_DIR=${MODDIR} -D JAR_BASENAME=${REALPRJNAME} -D MAIN_CLASS=${_JAR_MAIN_CLASS} -D ENABLE_PREVIEW_VALUE=${ENABLE_PREVIEW_VALUE} $Props } # tag:java-specific @@ -1204,7 +1196,7 @@ _GEN_JAVA_RUN_SH_OUTPUT=run.sh when ($HOST_OS_WINDOWS == "yes") { _GEN_JAVA_RUN_SH_OUTPUT=run.bat } -GEN_JAVA_RUN_SH=$SCRIPTGEN_RESOURCE_GLOBAL/scriptgen --java $JDK_RESOURCE/bin/java --output ${output:_GEN_JAVA_RUN_SH_OUTPUT} -D GENERATE_DEFAULT_RUNNER=yes -D JAR_NAME=${REALPRJNAME}.jar -D CLASSPATH=${nopath;join;pre="::":MANAGED_PEERS_CLOSURE} -D PROJECT_DIR=${REALPRJNAME} -D JAR_BASENAME=${REALPRJNAME} +GEN_JAVA_RUN_SH=$SCRIPTGEN_RESOURCE_GLOBAL/scriptgen --java $JDK_RESOURCE/bin/java --output ${output:_GEN_JAVA_RUN_SH_OUTPUT} -D GENERATE_DEFAULT_RUNNER=yes -D JAR_NAME=${REALPRJNAME}.jar -D CLASSPATH=${nopath;join;pre="::":MANAGED_PEERS_CLOSURE} -D PROJECT_DIR=${REALPRJNAME} -D JAR_BASENAME=${REALPRJNAME} -D MAIN_CLASS=${_JAR_MAIN_CLASS} -D ENABLE_PREVIEW=${ENABLE_PREVIEW_VALUE} GEN_RUN_CP=${WRITER_PY} --file ${BINDIR}/run-bf.txt -Q -m --ya-start-command-file ${nopath;qe;pre=$REALPRJNAME/:MANAGED_PEERS_CLOSURE} --ya-end-command-file && ${YMAKE_PYTHON} ${input:"build/scripts/make_manifest_from_bf.py"} ${BINDIR}/run-bf.txt ${TARGET} COLLECT_JAR_PROGRAM_CP=$FS_TOOLS link_or_copy_to_dir --ya-start-command-file ${ext=.jar:MANAGED_PEERS_CLOSURE} ${ext=.so:MANAGED_PEERS_CLOSURE} ${ext=.dll:MANAGED_PEERS_CLOSURE} ${ext=.dylib:MANAGED_PEERS_CLOSURE} ${_SOURCE_JARS} --ya-end-command-file ${BINDIR}/${REALPRJNAME} ${hide;late_out;nopath;ext=.jar;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} ${hide;late_out;nopath;ext=.so;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} ${hide;late_out;nopath;ext=.dll;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} ${hide;late_out;nopath;ext=.dylib;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} MAKE_JAR_PROGRAM_CPLST=${MAKE_JAVA_CLASSPATH_FILE} --from-args ${output;pre=$MODULE_PREFIX;suf=${MODULE_SUFFIX}.cplst:REALPRJNAME} --ya-start-command-file ${nopath;rootrel;ext=.jar;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} ${_SOURCE_JARS_CPLIST} --ya-end-command-file @@ -2087,7 +2079,7 @@ module JSRC_LIBRARY: _BARE_UNIT { .PEERDIR_POLICY=as_include .FINAL_TARGET=no .ALIASES=SRCS=FILES - PEERDIR_TAGS=JAVA JAVA_PROTO JAVA_FBS JAVA_IDL + PEERDIR_TAGS=JAVA JAVA_PROTO JAVA_PROTO_FROM_SCHEMA JAVA_FBS JAVA_IDL MODULE_TYPE=LIBRARY SET(MODULE_SUFFIX .jsrc) SET(DONT_RESOLVE_INCLUDES yes) |