diff options
author | dimdim11 <dimdim11@yandex-team.com> | 2023-11-20 08:09:07 +0300 |
---|---|---|
committer | dimdim11 <dimdim11@yandex-team.com> | 2023-11-20 08:34:42 +0300 |
commit | e540871359c8a049f7b3228a73081504b6898683 (patch) | |
tree | 4aac6582dac60d4db41bf019e1feec2cb00b0a34 | |
parent | e6c39085c1c04fab359caa62bbc06eb997dffada (diff) | |
download | ydb-e540871359c8a049f7b3228a73081504b6898683.tar.gz |
Fixes around JAVA_SRCS
Fixes around JAVA_SRCS
-rw-r--r-- | build/conf/java.conf | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/build/conf/java.conf b/build/conf/java.conf index 331d53cac7..afd0735082 100644 --- a/build/conf/java.conf +++ b/build/conf/java.conf @@ -266,7 +266,7 @@ LINK_JAR_RESOURCES= LINK_JAR_JSOURCES= JAR_GEN_SRCS= JAR_GEN_JSRCS= -macro _JAVA_SRCS(SRCDIR=".", PACKAGE_PREFIX="", EXCLUDE[], FILES[], RESOURCES?"yes":"no", SKIP_CHECK_SRCDIR?"SKIP_CHECK_SRCDIR":"", Globs...) { +macro _JAVA_SRCS(RESOURCES?"yes":"no", SRCDIR=".", PACKAGE_PREFIX="", EXCLUDE[], FILES[], SKIP_CHECK_SRCDIR?"SKIP_CHECK_SRCDIR":"", Globs...) { _CHECK_JAVA_SRCDIR($SKIP_CHECK_SRCDIR $SRCDIR) SET_APPEND(ALL_SRCDIRS $SRCDIR) SET(VAR_SALT $SRCDIR $Globs $EXCLUDE $PACKAGE_PREFIX $RESOURCES $FILES) @@ -280,10 +280,10 @@ macro _JAVA_SRCS(SRCDIR=".", PACKAGE_PREFIX="", EXCLUDE[], FILES[], RESOURCES?"y _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) } -macro IDEA_JAVA_SRCS(Args...) { +### Fill JAVA_SRCS to value for ya ide idea and real apply for late globs +macro FULL_JAVA_SRCS(Args...) { + _IDEA_JAVA_SRCS_VALUE($Args) _JAVA_SRCS($Args) - # Fill JAVA_SRCS_VALUE for ya ide idea - SET_APPEND(JAVA_SRCS_VALUE $ARGS_DELIM $Args) } # tag:java-specific @@ -293,12 +293,9 @@ macro IDEA_JAVA_SRCS(Args...) { ### and all resources an be find at maven/gradle standard path src/main/resources **/* macro DEFAULT_JAVA_SRCS_LAYOUT() { # Maven default source paths, supported by gradle too - _JAVA_SRCS(SRCDIR src/main/java **/*.java SKIP_CHECK_SRCDIR) - # Fill JAVA_SRCS_VALUE for ya ide idea - SET_APPEND(JAVA_SRCS_VALUE $ARGS_DELIM SRCDIR src/main/java **/*.java) - _JAVA_SRCS(SRCDIR src/main/resources **/* RESOURCES SKIP_CHECK_SRCDIR) - # Fill JAVA_SRCS_VALUE for ya ide idea - SET_APPEND(JAVA_SRCS_VALUE $ARGS_DELIM SRCDIR src/main/resources **/* RESOURCES) + # JAVA_SRCS may be alias of FULL_JAVA_SRCS + FULL_JAVA_SRCS(SRCDIR src/main/java **/*.java SKIP_CHECK_SRCDIR) + FULL_JAVA_SRCS(RESOURCES SRCDIR src/main/resources **/* SKIP_CHECK_SRCDIR) } # tag:java-specific @@ -308,12 +305,9 @@ macro DEFAULT_JAVA_SRCS_LAYOUT() { ### and all resources can be find at maven/gradle standard path src/test/resources **/* macro DEFAULT_JUNIT_JAVA_SRCS_LAYOUT() { # Maven default test source paths, supported by gradle too - _JAVA_SRCS(SRCDIR java **/*.java SKIP_CHECK_SRCDIR) - # Fill JAVA_SRCS_VALUE for ya ide idea - SET_APPEND(JAVA_SRCS_VALUE $ARGS_DELIM SRCDIR java **/*.java) - _JAVA_SRCS(SRCDIR resources **/* RESOURCES SKIP_CHECK_SRCDIR) - # Fill JAVA_SRCS_VALUE for ya ide idea - SET_APPEND(JAVA_SRCS_VALUE $ARGS_DELIM SRCDIR resources **/* RESOURCES) + # JAVA_SRCS may be alias of FULL_JAVA_SRCS + FULL_JAVA_SRCS(SRCDIR java **/*.java SKIP_CHECK_SRCDIR) + FULL_JAVA_SRCS(RESOURCES SRCDIR resources **/* SKIP_CHECK_SRCDIR) } macro _HASH_HELPER(Args...) { @@ -832,7 +826,7 @@ module JAR_LIBRARY: _COMPILABLE_JAR_BASE { .CMD=LINK_JAR .SEM=BUILD_JAR_SEM .FINAL_TARGET=yes - .ALIASES=JAVA_SRCS=IDEA_JAVA_SRCS ANNOTATION_PROCESSOR=JAR_ANNOTATION_PROCESSOR + .ALIASES=JAVA_SRCS=FULL_JAVA_SRCS ANNOTATION_PROCESSOR=JAR_ANNOTATION_PROCESSOR .RESTRICTED=EXTERNAL_JAR .GLOBAL=MAVEN_EXPORT_COORDS EXPORT_GRADLE_PROJECT_COORDS MODULE_SUFFIX=.jar @@ -1605,6 +1599,13 @@ macro EXCLUDE(Args...) { # tag:java-specific JAVA_SRCS_VALUE= + +### Fill JAVA_SRCS_VALUE for ya ide idea, skip SKIP_CHECK_SRCDIR option +macro _IDEA_JAVA_SRCS_VALUE(RESOURCES?"RESOURCES":"", SKIP_CHECK_SRCDIR?"SKIP_CHECK_SRCDIR":"", Args...) { + # RESOURCES must be at first position, else ya ide idea will fault + SET_APPEND(JAVA_SRCS_VALUE $ARGS_DELIM $RESOURCES $Args) +} + ### @usage: JAVA_SRCS(srcs) ### ### Specify java source files and resources. A macro can be contained in any of four java modules. @@ -1630,10 +1631,8 @@ JAVA_SRCS_VALUE= ### ### Documentation: https://wiki.yandex-team.ru/yatool/java/#javasrcs macro JAVA_SRCS(Args...) { - # TODO Add $Args to semantic jar_source_set - # TODO Call _JAVA_SRCS($Args) - # Fill JAVA_SRCS_VALUE for ya ide idea - SET_APPEND(JAVA_SRCS_VALUE $ARGS_DELIM $Args) + # TODO Use FULL_JAVA_SRCS + _IDEA_JAVA_SRCS_VALUE($Args) } # tag:java-specific |