diff options
author | dimdim11 <dimdim11@yandex-team.com> | 2023-11-16 11:48:33 +0300 |
---|---|---|
committer | dimdim11 <dimdim11@yandex-team.com> | 2023-11-16 12:13:30 +0300 |
commit | cad48ec10de00593812e1ff8b2780c203b7d156f (patch) | |
tree | def98200e9c175b77c1aa303028fabd9426b045f /build/conf/java.conf | |
parent | 7cf07089bea73f988af6389f056842aff9284d11 (diff) | |
download | ydb-cad48ec10de00593812e1ff8b2780c203b7d156f.tar.gz |
Default JAVA_SRCS with fix
Fix JAVA_SRCS
Default JAVA_SRCS
Diffstat (limited to 'build/conf/java.conf')
-rw-r--r-- | build/conf/java.conf | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/build/conf/java.conf b/build/conf/java.conf index ccd8fa84e0..53fa44a2a6 100644 --- a/build/conf/java.conf +++ b/build/conf/java.conf @@ -266,8 +266,8 @@ LINK_JAR_RESOURCES= LINK_JAR_JSOURCES= JAR_GEN_SRCS= JAR_GEN_JSRCS= -macro _JAR_SRCS(SRCDIR=".", PACKAGE_PREFIX="", EXCLUDE[], FILES[], RESOURCES?"yes":"no", Globs...) { - _CHECK_JAVA_SRCDIR($SRCDIR) +macro _JAVA_SRCS(SRCDIR=".", PACKAGE_PREFIX="", EXCLUDE[], FILES[], RESOURCES?"yes":"no", 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) SET(JAR_SRCS_GLOB uniq_${hash:VAR_SALT}) @@ -280,11 +280,27 @@ macro _JAR_SRCS(SRCDIR=".", PACKAGE_PREFIX="", EXCLUDE[], FILES[], RESOURCES?"ye _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_JAR_SRCS(Args...) { - _JAR_SRCS($Args) +macro IDEA_JAVA_SRCS(Args...) { + _JAVA_SRCS($Args) + # Fill JAVA_SRCS_VALUE for ya ide idea SET_APPEND(JAVA_SRCS_VALUE $ARGS_DELIM $Args) } +# tag:java-specific +### @usage: DEFAULT_JAVA_SRCS_LAYOUT() +### +### DEFAULT_JAVA_SRCS_LAYOUT() declare all source files can be find at maven/gradle standard path src/main/java **/*.java +### 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) +} + macro _HASH_HELPER(Args...) { .CMD=${hash:Args} .SEM=${hash:Args} @@ -801,7 +817,7 @@ module JAR_LIBRARY: _COMPILABLE_JAR_BASE { .CMD=LINK_JAR .SEM=BUILD_JAR_SEM .FINAL_TARGET=yes - .ALIASES=JAVA_SRCS=IDEA_JAR_SRCS ANNOTATION_PROCESSOR=JAR_ANNOTATION_PROCESSOR + .ALIASES=JAVA_SRCS=IDEA_JAVA_SRCS ANNOTATION_PROCESSOR=JAR_ANNOTATION_PROCESSOR .RESTRICTED=EXTERNAL_JAR .GLOBAL=MAVEN_EXPORT_COORDS EXPORT_GRADLE_PROJECT_COORDS MODULE_SUFFIX=.jar @@ -1578,7 +1594,7 @@ JAVA_SRCS_VALUE= ### ### Specify java source files and resources. A macro can be contained in any of four java modules. ### Keywords: -### 1. X SRCDIR - specify the directory x is performed relatively to search the source code for these patterns. If there is no SRCDIR, the source will be searched relative to the module directory. +### 1. SRCDIR x - specify the directory x is performed relatively to search the source code for these patterns. If there is no SRCDIR, the source will be searched relative to the module directory. ### 2. PACKAGE_PREFIX x - use if source paths relative to the SRCDIR does not coincide with the full class names. For example, if all sources of module are in the same package, you can create a directory package/name , and just put the source code in the SRCDIR and specify PACKAGE_PREFIX package.name. ### ### @example: @@ -1599,6 +1615,9 @@ 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) } |