diff options
author | snermolaev <snermolaev@yandex-team.com> | 2023-08-01 06:42:50 +0300 |
---|---|---|
committer | snermolaev <snermolaev@yandex-team.com> | 2023-08-01 06:42:50 +0300 |
commit | 41f1d39c85a1cbe85dede2dccd657bc0c8d70da7 (patch) | |
tree | 20099ee3fef2afba36986a9d5436e64622ef1728 /build/ymake.core.conf | |
parent | 2562cbfa09ddbc00e5a23b6c05c58cf3ba1d9c5a (diff) | |
download | ydb-41f1d39c85a1cbe85dede2dccd657bc0c8d70da7.tar.gz |
move java and perl remaining stuff to their confs
Diffstat (limited to 'build/ymake.core.conf')
-rw-r--r-- | build/ymake.core.conf | 821 |
1 files changed, 1 insertions, 820 deletions
diff --git a/build/ymake.core.conf b/build/ymake.core.conf index ac3f90728d..232285aa4e 100644 --- a/build/ymake.core.conf +++ b/build/ymake.core.conf @@ -2907,314 +2907,6 @@ macro _SRCS_NO_GLOBAL(GLOBAL[], FILES...) { @import "${CONF_ROOT}/conf/java.conf" @import "${CONF_ROOT}/conf/python.conf" -# tag:java-specific -JAVA_SWIG_DELIM=JAVA_SWIG_DELIM - -# tag:java-specific -JDK_REAL_VERSION= -JDK_VERSION= - -when ($JDK_VERSION == "20") { - JDK_REAL_VERSION=20 -} -elsewhen ($JDK_VERSION == "19") { - JDK_REAL_VERSION=19 -} -elsewhen ($JDK_VERSION == "18") { - JDK_REAL_VERSION=18 -} -elsewhen ($JDK_VERSION == "17") { - JDK_REAL_VERSION=17 -} -elsewhen ($JDK_VERSION == "16") { - JDK_REAL_VERSION=16 -} -elsewhen ($JDK_VERSION == "15") { - JDK_REAL_VERSION=15 -} -elsewhen ($JDK_VERSION == "11") { - JDK_REAL_VERSION=11 -} -elsewhen ($JDK_VERSION == "10") { - JDK_REAL_VERSION=10 -} -elsewhen ($JDK_VERSION == "8") { - JDK_REAL_VERSION=8 -} -elsewhen ($MAPSMOBI_BUILD_TARGET && $OS_ANDROID) { - JDK_REAL_VERSION=11 -} -otherwise { - JDK_REAL_VERSION=17 -} - -# tag:java-specific -# remove extra peerdir to jdk11 after https://st.yandex-team.ru/DEVTOOLS-8851 is done -when ($USE_SYSTEM_JDK) { - JDK_RESOURCE_PEERDIR= -} -otherwise { - when ($JDK_REAL_VERSION == "20") { - JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk20 build/platform/java/jdk/jdk17 - } - when ($JDK_REAL_VERSION == "19") { - JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk19 build/platform/java/jdk/jdk17 - } - when ($JDK_REAL_VERSION == "18") { - JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk18 build/platform/java/jdk/jdk17 - } - when ($JDK_REAL_VERSION == "17") { - # need jdk11 for spare parts in "host" platform - JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk17 build/platform/java/jdk/jdk11 - } - when ($JDK_REAL_VERSION == "16") { - JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk16 build/platform/java/jdk/jdk17 - } - when ($JDK_REAL_VERSION == "15") { - JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk15 build/platform/java/jdk/jdk17 - } - when ($JDK_REAL_VERSION == "11") { - JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk11 build/platform/java/jdk/jdk17 - } - when ($JDK_REAL_VERSION == "10") { - JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk10 build/platform/java/jdk/jdk17 - } - when ($JDK_REAL_VERSION == "8") { - JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk8 build/platform/java/jdk/jdk17 - } -} - -# tag:java-specific -when ($JDK_REAL_VERSION == "20") { - UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar20 -} -when ($JDK_REAL_VERSION == "19") { - UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar18 -} -when ($JDK_REAL_VERSION == "18") { - UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar18 -} -when ($JDK_REAL_VERSION == "17") { - UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar17 -} -when ($JDK_REAL_VERSION == "16") { - UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar16 -} -when ($JDK_REAL_VERSION == "15") { - UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar15 -} -when ($JDK_REAL_VERSION == "11") { - UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar11 -} -when ($JDK_REAL_VERSION == "10") { - UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar10 -} -when ($JDK_REAL_VERSION == "8") { - UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar8 -} - -# tag:java-specific -JAVAC_OPTS= -when ($USE_SYSTEM_JDK) { - JDK_RESOURCE=$USE_SYSTEM_JDK -} -otherwise { - when ($JDK_REAL_VERSION == "20") { - JDK_RESOURCE=$JDK20_RESOURCE_GLOBAL - } - when ($JDK_REAL_VERSION == "19") { - JDK_RESOURCE=$JDK19_RESOURCE_GLOBAL - } - when ($JDK_REAL_VERSION == "18") { - JDK_RESOURCE=$JDK18_RESOURCE_GLOBAL - } - when ($JDK_REAL_VERSION == "17") { - JDK_RESOURCE=$JDK17_RESOURCE_GLOBAL - } - when ($JDK_REAL_VERSION == "16") { - JDK_RESOURCE=$JDK16_RESOURCE_GLOBAL - } - when ($JDK_REAL_VERSION == "15") { - JDK_RESOURCE=$JDK15_RESOURCE_GLOBAL - } - when ($JDK_REAL_VERSION == "11") { - JDK_RESOURCE=$JDK11_RESOURCE_GLOBAL - } - when ($JDK_REAL_VERSION == "10") { - JDK_RESOURCE=$JDK10_RESOURCE_GLOBAL - } - when ($JDK_REAL_VERSION == "8") { - JDK_RESOURCE=$JDK8_RESOURCE_GLOBAL - } -} - -# tag:java-specific -when (!$USE_SYSTEM_ERROR_PRONE) { - # Still not done: DTCC-667 - when ($JDK_REAL_VERSION == "8" || $JDK_REAL_VERSION == "10") { - ERROR_PRONE_VERSION=2.3.1 - ERROR_PRONE_PEERDIR=build/platform/java/error_prone/2.3.1 - ERROR_PRONE_RESOURCE=$ERROR_PRONE_2_3_1_RESOURCE_GLOBAL - } - elsewhen ($JDK_REAL_VERSION == "11" || $JDK_REAL_VERSION == "15" || $JDK_REAL_VERSION == "16") { - ERROR_PRONE_VERSION=2.7.1 - ERROR_PRONE_PEERDIR=build/platform/java/error_prone/2.7.1 - ERROR_PRONE_RESOURCE=$ERROR_PRONE_2_7_1_RESOURCE_GLOBAL - } - elsewhen ($JDK_REAL_VERSION == "17") { - ERROR_PRONE_VERSION=2.10.0 - ERROR_PRONE_PEERDIR=build/platform/java/error_prone/2.10.0 - ERROR_PRONE_RESOURCE=$ERROR_PRONE_2_10_0_RESOURCE_GLOBAL - } - elsewhen ($JDK_REAL_VERSION == "18") { - ERROR_PRONE_VERSION=2.14.0 - ERROR_PRONE_PEERDIR=build/platform/java/error_prone/2.14.0 - ERROR_PRONE_RESOURCE=$ERROR_PRONE_2_14_0_RESOURCE_GLOBAL - } - elsewhen ($JDK_REAL_VERSION == "19") { - ERROR_PRONE_VERSION=2.18.0 - ERROR_PRONE_PEERDIR=build/platform/java/error_prone/2.18.0 - ERROR_PRONE_RESOURCE=$ERROR_PRONE_2_18_0_RESOURCE_GLOBAL - } - elsewhen ($JDK_REAL_VERSION == "20") { - ERROR_PRONE_VERSION=2.18.0 - ERROR_PRONE_PEERDIR=build/platform/java/error_prone/2.18.0 - ERROR_PRONE_RESOURCE=$ERROR_PRONE_2_18_0_RESOURCE_GLOBAL - } - otherwise { - ERROR_PRONE_VERSION=2.7.1 - ERROR_PRONE_PEERDIR=build/platform/java/error_prone - ERROR_PRONE_RESOURCE=$ERROR_PRONE_RESOURCE_GLOBAL - } -} -otherwise { - ERROR_PRONE_VERSION=2.7.1 - ERROR_PRONE_PEERDIR=build/platform/java/error_prone - ERROR_PRONE_RESOURCE=$ERROR_PRONE_RESOURCE_GLOBAL -} - -# tag:java-specific -when ($USE_SYSTEM_UBERJAR) { - UBERJAR_RESOURCE=$USE_SYSTEM_UBERJAR -} -otherwise { - when ($JDK_REAL_VERSION == "20") { - UBERJAR_RESOURCE=$UBERJAR20_RESOURCE_GLOBAL - } - when ($JDK_REAL_VERSION == "19") { - UBERJAR_RESOURCE=$UBERJAR18_RESOURCE_GLOBAL - } - when ($JDK_REAL_VERSION == "18") { - UBERJAR_RESOURCE=$UBERJAR18_RESOURCE_GLOBAL - } - when ($JDK_REAL_VERSION == "17") { - UBERJAR_RESOURCE=$UBERJAR17_RESOURCE_GLOBAL - } - when ($JDK_REAL_VERSION == "16") { - UBERJAR_RESOURCE=$UBERJAR16_RESOURCE_GLOBAL - } - when ($JDK_REAL_VERSION == "15") { - UBERJAR_RESOURCE=$UBERJAR15_RESOURCE_GLOBAL - } - when ($JDK_REAL_VERSION == "11") { - UBERJAR_RESOURCE=$UBERJAR11_RESOURCE_GLOBAL - } - when ($JDK_REAL_VERSION == "10") { - UBERJAR_RESOURCE=$UBERJAR10_RESOURCE_GLOBAL - } - when ($JDK_REAL_VERSION == "8") { - UBERJAR_RESOURCE=$UBERJAR8_RESOURCE_GLOBAL - } -} - -# tag:java-specific -when ($JDK_REAL_VERSION == "20") { - WITH_JDK_RESOURCE=$WITH_JDK20_RESOURCE_GLOBAL -} -when ($JDK_REAL_VERSION == "19") { - WITH_JDK_RESOURCE=$WITH_JDK19_RESOURCE_GLOBAL -} -when ($JDK_REAL_VERSION == "18") { - WITH_JDK_RESOURCE=$WITH_JDK18_RESOURCE_GLOBAL -} -when ($JDK_REAL_VERSION == "17") { - WITH_JDK_RESOURCE=$WITH_JDK17_RESOURCE_GLOBAL -} -when ($JDK_REAL_VERSION == "16") { - WITH_JDK_RESOURCE=$WITH_JDK16_RESOURCE_GLOBAL -} -when ($JDK_REAL_VERSION == "15") { - WITH_JDK_RESOURCE=$WITH_JDK15_RESOURCE_GLOBAL -} -when ($JDK_REAL_VERSION == "11") { - WITH_JDK_RESOURCE=$WITH_JDK11_RESOURCE_GLOBAL -} -when ($JDK_REAL_VERSION == "10") { - WITH_JDK_RESOURCE=$WITH_JDK10_RESOURCE_GLOBAL -} -when ($JDK_REAL_VERSION == "8") { - WITH_JDK_RESOURCE=$WITH_JDK8_RESOURCE_GLOBAL -} - -# tag:java-specific -EXTERNAL_JAVA_JDK_RESOURCE= -EXTERNAL_JAVA_EXTRA_PEERDIR= -when ($USE_SYSTEM_JDK) { - EXTERNAL_JAVA_EXTRA_PEERDIR= - EXTERNAL_JAVA_JDK_RESOURCE=$USE_SYSTEM_JDK -} -elsewhen ($JDK_VERSION == "") { - EXTERNAL_JAVA_JDK_RESOURCE=$JDK11_RESOURCE_GLOBAL - EXTERNAL_JAVA_EXTRA_PEERDIR=build/platform/java/jdk/jdk11 -} -otherwise { - EXTERNAL_JAVA_JDK_RESOURCE=$JDK_RESOURCE -} -COMPILE_JAVA=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/compile_java.py"} --java-bin $EXTERNAL_JAVA_JDK_RESOURCE/bin/java --javac-bin $EXTERNAL_JAVA_JDK_RESOURCE/bin/javac --jar-bin $JDK_RESOURCE/bin/jar --kotlin-compiler $KOTLIN_COMPILER_RESOURCE_GLOBAL/kotlin-compiler.jar $JAVA_VCS_MF_ARG $PACKAGE_PREFIX_ARGS --jar-output $TARGET --srcs-jar-output ${output;suf=-sources.jar:REALPRJNAME} $AUTO_INPUT DELIM $JAVAC_OPTS DELIM $MANAGED_PEERS_CLOSURE DELIM -no-stdlib -module-name $REALPRJNAME -jvm-target ${KOTLIN_JVM_TARGET} ${KOTLINC_OPTS_VALUE} ${kv;hide:"p JV"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} ${requirements;hide:"cpu:2"} - -ARGS_DELIM="MACRO_CALLS_DELIM" - -SYSTEM_PROPERTIES_VALUE= -### @usage: SYSTEM_PROPERTIES([<Key Value>...] [<File Path>...]) -### -### List of Key,Value pairs that will be available to test via System.getProperty(). -### FILE means that parst should be read from file specifies as Path. -### -### Documentation: https://wiki.yandex-team.ru/yatool/test/ -macro SYSTEM_PROPERTIES(Args...) { - SET_APPEND(SYSTEM_PROPERTIES_VALUE $Args) -} - -# tag:java-specific -JVM_ARGS_VALUE= -### @usage: JVM_ARGS(Args...) -### -### Arguments to run Java programs in tests. -### -### Documentation: https://wiki.yandex-team.ru/yatool/test/ -macro JVM_ARGS(Args...) { - SET_APPEND(JVM_ARGS_VALUE $Args) -} - -# tag:java-specific -CHECK_JAVA_DEPS_VALUE= -### @usage: CHECK_JAVA_DEPS(<yes|no>) -### -### Check for different classes with duplicate name in classpath. -### -### Documentation: https://wiki.yandex-team.ru/yatool/test/ -macro CHECK_JAVA_DEPS(Arg) { - SET(CHECK_JAVA_DEPS_VALUE $Arg) -} - -ERROR_PRONE_VALUE= -### @usage: USE_ERROR_PRONE() -### -### Use errorprone instead of javac for .java compilation. -macro USE_ERROR_PRONE() { - SET(ERROR_PRONE_VALUE yes) -} - TEST_CWD_VALUE= ### @usage: TEST_CWD(path) ### @@ -3226,467 +2918,6 @@ macro TEST_CWD(Arg) { SET(TEST_CWD_VALUE $Arg) } -# tag:java-specific -MAKE_UBERJAR_VALUE= -### @usage: UBERJAR() -### -### UBERJAR is a single all-in-one jar-archive that includes all its Java dependencies (reachable PEERDIR). -### It also supports shading classes inside the archive by moving them to a different package (similar to the maven-shade-plugin). -### Use UBERJAR inside JAVA_PROGRAM module. -### -### You can use the following macros to configure the archive: -### 1. UBERJAR_HIDING_PREFIX prefix for classes to shade (classes remain in their packages by default) -### 2. UBERJAR_HIDE_EXCLUDE_PATTERN exclude classes matching this patterns from shading (if enabled). -### 3. UBERJAR_PATH_EXCLUDE_PREFIX the prefix for classes that should not get into the jar archive (all classes are placed into the archive by default) -### 4. UBERJAR_MANIFEST_TRANSFORMER_MAIN add ManifestResourceTransformer class to uberjar processing and specify main-class -### 5. UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE add ManifestResourceTransformer class to uberjar processing and specify some attribute -### 6. UBERJAR_APPENDING_TRANSFORMER add AppendingTransformer class to uberjar processing -### 7. UBERJAR_SERVICES_RESOURCE_TRANSFORMER add ServicesResourceTransformer class to uberjar processing -### -### Documentation: https://wiki.yandex-team.ru/yatool/java/ -### -### @see: [JAVA_PROGRAM](#module_JAVA_PROGRAM), [UBERJAR_HIDING_PREFIX](#macro_UBERJAR_HIDING_PREFIX), [UBERJAR_HIDE_EXCLUDE_PATTERN](#macro_UBERJAR_HIDE_EXCLUDE_PATTERN), [UBERJAR_PATH_EXCLUDE_PREFIX](#macro_UBERJAR_PATH_EXCLUDE_PREFIX) -macro UBERJAR() { - SET(MAKE_UBERJAR_VALUE yes) - DISABLE(PASS_PEERS) -} - -# tag:java-specific -UBERJAR_PREFIX_VALUE= -UBERJAR_PREFIX_FLAG= -### @usage: UBERJAR_HIDING_PREFIX(Arg) -### -### Set prefix for classes to shade. All classes in UBERJAR will be moved into package prefixed with Arg. -### Classes remain in their packages by default. -### -### @see: [UBERJAR](#macro_UBERJAR) -macro UBERJAR_HIDING_PREFIX(Arg) { - SET(UBERJAR_PREFIX_VALUE $Arg) - SET(UBERJAR_PREFIX_FLAG ${pre=--shade-prefix :Arg}) -} - -# tag:java-specific -UBERJAR_HIDE_EXCLUDE_VALUE= -UBERJAR_HIDE_EXCLUDE_FLAGS= -### @usage: UBERJAR_HIDE_EXCLUDE_PATTERN(Args...) -### -### Exclude classes matching this patterns from shading (if enabled). -### Pattern may contain '*' and '**' globs. -### Shading is enabled for UBERJAR program using UBERJAR_HIDING_PREFIX macro. If this macro is not specified all classes are shaded. -### -### @see: [UBERJAR](#macro_UBERJAR), [UBERJAR_HIDING_PREFIX](#macro_UBERJAR_HIDING_PREFIX) -macro UBERJAR_HIDE_EXCLUDE_PATTERN(Args...) { - SET_APPEND(UBERJAR_HIDE_EXCLUDE_VALUE $ARGS_DELIM $Args) - SET_APPEND(UBERJAR_HIDE_EXCLUDE_FLAGS ${pre=--shade-exclude :Args}) -} - -# tag:java-specific -UBERJAR_PATH_EXCLUDES= -UBERJAR_PATH_EXCLUDE_VALUE= -### @usage: UBERJAR_PATH_EXCLUDE_PREFIX(Args...) -### -### Exclude classes matching this patterns from UBERJAR. -### By default all dependencies of UBERJAR program will lend in a .jar archive. -### -### @see: [UBERJAR](#macro_UBERJAR) -macro UBERJAR_PATH_EXCLUDE_PREFIX(Args...) { - SET_APPEND(UBERJAR_PATH_EXCLUDE_VALUE $ARGS_DELIM $Args) - SET_APPEND(UBERJAR_PATH_EXCLUDES ${pre=--uber-exclude :Args}) -} - -# tag:java-specific -UBERJAR_MANIFEST_TRANSFORMER_MAIN_VALUE= -UBERJAR_MANIFEST_TRANSFORMER_MAIN_FLAG= -### @usage: UBERJAR_MANIFEST_TRANSFORMER_MAIN(Main) -### -### Transform manifest.mf for UBERJAR() java programs, set main-class attribute -### -### @see: [UBERJAR](#macro_UBERJAR) -macro UBERJAR_MANIFEST_TRANSFORMER_MAIN(Main) { - SET(UBERJAR_MANIFEST_TRANSFORMER_MAIN_VALUE $Main) - SET(UBERJAR_MANIFEST_TRANSFORMER_MAIN_FLAG --manifest-main $Main) -} - -# tag:java-specific -UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_VALUE= -UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_FLAGS= -### @usage: UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE(Key, Value) -### -### Transform manifest.mf for UBERJAR() java programs, set attribute -### -### @see: [UBERJAR](#macro_UBERJAR) -macro UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE(Key, Value) { - SET_APPEND(UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_VALUE $ARGS_DELIM $Key : $Value) - SET_APPEND(UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_FLAGS --manifest-attribute ${Key}:${Value}) -} - -# tag:java-specific -UBERJAR_APPENDING_TRANSFORMER_VALUE= -UBERJAR_APPENDING_TRANSFORMER_FLAGS= -### @usage: UBERJAR_APPENDING_TRANSFORMER(Resource) -### -### Add AppendingTransformer for UBERJAR() java programs -### -### Parameters: -### - Resource - Resource name -### -### @see: [UBERJAR](#macro_UBERJAR) -macro UBERJAR_APPENDING_TRANSFORMER(Resources...) { - SET_APPEND(UBERJAR_APPENDING_TRANSFORMER_VALUE $ARGS_DELIM $Resources) - SET_APPEND(UBERJAR_APPENDING_TRANSFORMER_FLAGS ${pre=--append-transformer :Resources}) -} - -# tag:java-specific -UBERJAR_SERVICES_RESOURCE_TRANSFORMER_VALUE= -UBERJAR_SERVICES_RESOURCE_TRANSFORMER_FLAG= -### @usage: UBERJAR_SERVICES_RESOURCE_TRANSFORMER() -### -### Add ServicesResourceTransformer for UBERJAR() java programs -### -### @see: [UBERJAR](#macro_UBERJAR) -macro UBERJAR_SERVICES_RESOURCE_TRANSFORMER() { - SET(UBERJAR_SERVICES_RESOURCE_TRANSFORMER_VALUE yes) - SET(UBERJAR_SERVICES_RESOURCE_TRANSFORMER_FLAG --service-transformer) -} - -# tag:idea-specific -IDEA_EXCLUDE_DIRS_VALUE= -### @usage: IDEA_EXCLUDE_DIRS(<excluded dirs>) -### -### Exclude specified directories from an idea project generated by ya ide idea -### Have no effect on regular build. -macro IDEA_EXCLUDE_DIRS(Args...) { - SET_APPEND(IDEA_EXCLUDE_DIRS_VALUE $Args) -} - -# tag:idea-specific -IDEA_RESOURCE_DIRS_VALUE= -### @usage: IDEA_RESOURCE_DIRS(<additional dirs>) -### -### Set specified resource directories in an idea project generated by ya ide idea -### Have no effect on regular build. -macro IDEA_RESOURCE_DIRS(Args...) { - SET_APPEND(IDEA_RESOURCE_DIRS_VALUE $Args) -} - -# tag:idea-specific -IDEA_MODULE_NAME_VALUE= -### @usage: IDEA_MODULE_NAME(module_name) -### -### Set module name in an idea project generated by ya ide idea -### Have no effect on regular build. -macro IDEA_MODULE_NAME(Name) { - SET(IDEA_MODULE_NAME_VALUE $Name) -} - -# tag:java-specific -JAVAC_FLAGS_VALUE= -### @usage: JAVAC_FLAGS(Args...) -### -### Set additional Java compilation flags. -macro JAVAC_FLAGS(Args...) { - SET_APPEND(JAVAC_OPTS $Args) - SET_APPEND(JAVAC_FLAGS_VALUE $ARGS_DELIM $Args) -} - -# tag:java-specific -ENABLE_PREVIEW_VALUE= -### @usage: ENABLE_PREVIEW() -### -### Enable java preview features. -macro ENABLE_PREVIEW() { - SET_APPEND(JVM_ARGS_VALUE --enable-preview) - SET_APPEND(JAVAC_OPTS --enable-preview --release $JDK_REAL_VERSION) - SET_APPEND(JAVAC_FLAGS_VALUE --enable-preview --release $JDK_REAL_VERSION) - SET(ENABLE_PREVIEW_VALUE yes) -} - -# tag:java-specific -SAVE_JAVAC_GENERATED_SRCS= -SAVE_JAVAC_GENERATED_SRCS_DIR= -SAVE_JAVAC_GENERATED_SRCS_TAR= -when ($SAVE_JAVAC_GENERATED_SRCS) { - SAVE_JAVAC_GENERATED_SRCS_DIR=${BINDIR}/__javac_generated_srcs__ - SAVE_JAVAC_GENERATED_SRCS_TAR=${BINDIR}/javac_generated.tar - JAVAC_FLAGS_VALUE+=-s $SAVE_JAVAC_GENERATED_SRCS_DIR -} - -# tag:java-specific -# TODO: MAVEN_GROUP_ID_VALUE is only used by jbuild remove it after YMAKE-45 and YMAKE-46 -MAVEN_GROUP_ID_VALUE= -MAVEN_EXPORT_GOUP_ID=ru.yandex -### @usage: MAVEN_GROUP_ID(group_id_for_maven_export) -### -### Set maven export group id for JAVA_PROGRAM() and JAVA_LIBRARY(). -### Have no effect on regular build. -macro MAVEN_GROUP_ID(Arg, VERSION="no") { - SET(MAVEN_GROUP_ID_VALUE $Arg) - SET(MAVEN_EXPORT_GOUP_ID $Arg) - SET(PUBLISH_MAVEN_VERSION $VERSION) -} - -# tag:java-specific -ANNOTATION_PROCESSOR_VALUE= -### @usage: ANNOTATION_PROCESSOR(processors...) -### -### The macro is in development. -### Used to specify annotation processors to build JAVA_PROGRAM() and JAVA_LIBRARY(). -macro ANNOTATION_PROCESSOR(Args...) { - SET_APPEND(ANNOTATION_PROCESSOR_VALUE $ARGS_DELIM $Args) -} - -EXCLUDE_VALUE= -### EXCLUDE(prefixes) -### -### The macro is in development. -### Specifies which libraries should be excluded from the classpath. -macro EXCLUDE(Args...) { - SET_APPEND(EXCLUDE_VALUE $ARGS_DELIM $Args) -} - -# tag:java-specific -JAVA_SRCS_VALUE= -### @usage: JAVA_SRCS(srcs) -### -### 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. -### 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: -### - example/ya.make -### -### JAVA_PROGRAM() -### JAVA_SRCS(SRCDIR src/main/java **/*) -### END() -### -### - example/src/main/java/ru/yandex/example/HelloWorld.java -### -### package ru.yandex.example; -### public class HelloWorld { -### public static void main(String[] args) { -### System.out.println("Hello, World!"); -### } -### } -### -### Documentation: https://wiki.yandex-team.ru/yatool/java/#javasrcs -macro JAVA_SRCS(Args...) { - SET_APPEND(JAVA_SRCS_VALUE $ARGS_DELIM $Args) -} - -# tag:java-specific -JAVA_ADD_DLLS_VALUE=no -macro ADD_DLLS_TO_JAR() { - SET(JAVA_ADD_DLLS_VALUE yes) -} - -# tag:java-specific -MANAGED_PEERS= -MANAGED_PEERS_CLOSURE= -RUN_JAVA_PROGRAM_MANAGED= -MANAGEABLE_PEERS_ROOTS=contrib/java -HAS_MANAGEABLE_PEERS=no -PROPAGATES_MANAGEABLE_PEERS=no -# All items of this list must be PEERS, GHOST PEERS or TOOLS of the test module or module itself. -# All items of this list must has at least one of HAS_MANAGEABLE_PEERS or PROPAGATES_MANAGEABLE_PEERS flags set yes. -# This variable is used by JUnit tests but not TestNG. -TEST_CLASSPATH_VALUE= -# Calculated and replaced by ymake can be used in DART DATA -TEST_CLASSPATH_MANAGED= - -# tag:java-specific -DEPENDENCY_MANAGEMENT_VALUE= -### @usage: DEPENDENCY_MANAGEMENT(path/to/lib1 path/to/lib2 ...) -### -### Lock version of the library from the contrib/java at some point, so that all unversioned PEERDIRs to this library refer to the specified version. -### -### For example, if the module has PEERDIR (contrib/java/junit/junit), and -### 1. specifies DEPENDENCY_MANAGEMENT(contrib/java/junit/junit/4.12), -### the PEERDIR is automatically replaced by contrib/java/junit/junit/4.12; -### 2. doesn't specify DEPENDENCY_MANAGEMENT, PEERDIR automatically replaced -### with the default from contrib/java/junit/junit/ya.make. -### These defaults are always there and are supported by maven-import, which puts -### there the maximum version available in contrib/java. -### -### The property is transitive. That is, if module A PEERDIRs module B, and B has PEERDIR(contrib/java/junit/junit), and this junit was replaced by junit-4.12, then junit-4.12 will come to A through B. -### -### If some module has both DEPENDENCY_MANAGEMENT(contrib/java/junit/junit/4.12) and PERDIR(contrib/java/junit/junit/4.11), the PEERDIR wins. -### -### Documentation: https://wiki.yandex-team.ru/yatool/java/ -macro DEPENDENCY_MANAGEMENT(Args...) { - SET_APPEND(DEPENDENCY_MANAGEMENT_VALUE $ARGS_DELIM $Args) - _GHOST_PEERDIR($Args) -} - -# tag:java-specific -WITH_JDK_VALUE= -### @usage: WITH_JDK() -### -### Add directory with JDK to JAVA_PROGRAM output -macro WITH_JDK() { - SET(WITH_JDK_VALUE yes) -} - -# tag:kotlin-specific -WITH_KOTLIN_VALUE= -### @usage: WITH_KOTLIN() -### -### Compile kotlin source code in this java module -macro WITH_KOTLIN() { - SET(WITH_KOTLIN_VALUE yes) -} - -# tag:kotlin-specific -WITH_KAPT_VALUE= -### @usage: WITH_KAPT() -### -### Use kapt for as annotation processor -macro WITH_KAPT() { - SET(WITH_KAPT_VALUE yes) -} - -# tag:java-specific -WITH_GROOVY_VALUE= -### @usage: WITH_GROOVY() -### -### Compile groovy source code in this java module -macro WITH_GROOVY() { - SET(WITH_GROOVY_VALUE yes) -} - -# tag:kotlin-specific -KOTLINC_FLAGS_VALUE=-Xjvm-default=all -### @usage: KOTLINC_FLAGS(-flags) -### -### Set additional Kotlin compilation flags. -macro KOTLINC_FLAGS(Args...) { - SET_APPEND(KOTLINC_OPTS_VALUE $Args) -} - -# tag:kotlin-sppecific -WITH_KOTLINC_PLUGIN_ALLOPEN= -macro _WITH_KOTLINC_ALLOPEN(Options...) { - SET_APPEND(KOTLINC_OPTS_VALUE ${pre=-P plugin\:org.jetbrains.kotlin.allopen\::Options}) - SET(WITH_KOTLINC_PLUGIN_ALLOPEN yes) -} - -# tag:kotlin-specific -### @usage: WITH_KOTLINC_ALLOPEN(-flags) -### -### Enable allopen kotlin compiler plugin https://kotlinlang.org/docs/all-open-plugin.html -macro WITH_KOTLINC_ALLOPEN(HEAD, TAIL...) { - _WITH_KOTLINC_ALLOPEN($HEAD $TAIL) -} - - -# tag:kotlin-specific -WITH_KOTLINC_PLUGIN_LOMBOK= -### @usage: WITH_KOTLINC_LOMBOK(-flags) -### -### Enable lombok kotlin compiler plugin https://kotlinlang.org/docs/lombok.html -macro WITH_KOTLINC_LOMBOK(Options...) { - SET_APPEND(KOTLINC_OPTS_VALUE ${pre=-P plugin\:org.jetbrains.kotlin.lombok\::Options}) - SET(WITH_KOTLINC_PLUGIN_LOMBOK yes) -} - -# tag:kotlin-specific -WITH_KOTLINC_PLUGIN_NOARG= -### @usage: WITH_KOTLINC_NOARG(-flags) -### -### Enable noarg kotlin compiler plugin https://kotlinlang.org/docs/no-arg-plugin.html -macro WITH_KOTLINC_NOARG(Options...) { - SET_APPEND(KOTLINC_OPTS_VALUE ${pre=-P plugin\:org.jetbrains.kotlin.noarg\::Options}) - SET(WITH_KOTLINC_PLUGIN_NOARG yes) -} - -# tag:kotlin-specific -WITH_KOTLINC_PLUGIN_SERIALIZATION= -### @usage: WITH_KOTLINC_SERIALIZATION() -### -### Enable serialization kotlin compiler plugin https://kotlinlang.org/docs/serialization.html -macro WITH_KOTLINC_SERIALIZATION() { - SET(WITH_KOTLINC_PLUGIN_SERIALIZATION yes) -} - -# tag:kotlin-specific -### Also search for _KAPT_OPTS and change version there -KOTLIN_VERSION=1.8.20 -KOTLIN_BOM_FILE=${ARCADIA_ROOT}/contrib/java/org/jetbrains/kotlin/kotlin-bom/1.8.20/ya.dependency_management.inc -GROOVY_VERSION=3.0.5 - -# tag:java-specific -DIRECT_DEPS_ONLY_VALUE= -### @usage: DIRECT_DEPS_ONLY -### -### Add direct PEERDIR's only in java compile classpath -macro DIRECT_DEPS_ONLY() { - SET(DIRECT_DEPS_ONLY_VALUE yes) -} - -# tag:java-specific -JAVA_EXTERNAL_DEPENDENCIES_VALUE= -### @usage: JAVA_EXTERNAL_DEPENDENCIES(file1 file2 ...) -### -### Add non-source java external build dependency (like lombok config file) -macro JAVA_EXTERNAL_DEPENDENCIES(Args...) { - SET_APPEND(JAVA_EXTERNAL_DEPENDENCIES_VALUE $Args) -} - -# tag:java-specific -JAVA_CLASSPATH_CMD_TYPE_VALUE= - -# tag:java-specific -### @usage:TEST_JAVA_CLASSPATH_CMD_TYPE(Type) -### Available types: MANIFEST(default), COMMAND_FILE, LIST -### Method for passing a classpath value to a java command line -### MANIFEST via empty jar file with manifest that contains Class-Path attribute -### COMMAND_FILE via @command_file -### LIST via flat args -macro TEST_JAVA_CLASSPATH_CMD_TYPE(Type) { - SET(JAVA_CLASSPATH_CMD_TYPE_VALUE $Type) -} - -# tag:java-specific -IGNORE_JAVA_DEPENDENCIES_CONFIGURATION=no -JAVA_DEPENDENCIES_CONFIGURATION_VALUE= - -# tag:java-specific -### @usage JAVA_DEPENDENCIES_CONFIGURATION(Vetos...) -### Validate contrib/java dependencies -### Valid arguments -### FORBID_DIRECT_PEERDIRS - fail when module have direct PEERDIR (with version) (non-transitive) -### FORBID_CONFLICT - fail when module have resolved without DEPENDENCY_MANAGEMENT version conflict (transitive) -### FORBID_CONFLICT_DM - fail when module have resolved with DEPENDENCY_MANAGEMENT version conflict (transitive) -### FORBID_CONFLICT_DM_RECENT - like FORBID_CONFLICT_DM but fail only when dependency have more recent version than specified in DEPENDENCY_MANAGEMENT -### REQUIRE_DM - all dependencies must be specified in DEPENDENCY_MANAGEMENT (transitive) -macro JAVA_DEPENDENCIES_CONFIGURATION(Args...) { - SET_APPEND(JAVA_DEPENDENCIES_CONFIGURATION_VALUE $Args) -} - -# tag:java-specific -# TODO(DEVTOOLS-6901): remove this variable when there are no more references to it in jbuild -JAVA_FORBIDDEN_LIBRARIES_VALUE= - -# tag:java-specific -JAR_INCLUDE_FILTER_VALUE= -JAR_EXCLUDE_FILTER_VALUE= - -# tag:java-specific -### @usage:JAR_INCLUDE(Filters...) -### Filter .jar file content: keep only matched files -### * and ** patterns are supported (like JAVA_SRCS) -macro JAR_INCLUDE(Filters...) { - SET_APPEND(JAR_INCLUDE_FILTER_VALUE $Filters) -} - -# tag:java-specific -### @usage:JAR_EXCLUDE(Filters...) -### Filter .jar file content: remove matched files -### * and ** patterns are supported (like JAVA_SRCS) -macro JAR_EXCLUDE(Filters...) { - SET_APPEND(JAR_EXCLUDE_FILTER_VALUE $Filters) -} - # tag:sandbox-specific ### @usage: SANDBOX_TASK([Name]) ### @@ -3794,30 +3025,6 @@ when ($PERL_DEFAULT_PEERDIR == "yes") { } } -# tag:perl-specific -### @usage: USE_PERL_LIB() -### Add dependency on Perl to your LIBRARY -macro USE_PERL_LIB() { - PEERDIR(build/platform/perl) -} - -# tag:perl-specific -### @usage: USE_PERL_514_LIB() -### Add dependency on Perl 5.14 to your LIBRARY -macro USE_PERL_514_LIB() { - SET(PERL_SDK ubuntu-12) - SET(PERL_DEFAULT_PEERDIR no) - PEERDIR(build/platform/perl/5.14) -} - -# tag:perl-specific -### @usage: ADD_PERL_MODULE(Dir ModuleName) -### Add dependency on specified Perl module to the library -macro ADD_PERL_MODULE(Dir, Module) { - PEERDIR($Dir) - SET_APPEND(modules $Module) -} - # tag:allocator ### @usage: ALLOCATOR(Alloc) # Default: LF ### @@ -6702,33 +5909,6 @@ multimodule FBS_LIBRARY { } } -# tag:java-specific -_COMPILE_JSRC=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/compile_jsrc.py"} --input $AUTO_INPUT --output $TARGET --prefix $BINDIR ${kv;hide:"p JC"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} - -# tag:java-specific -COMPILE_JSRC_MF=$_COMPILE_JSRC && $GENERATE_MF - -# tag:java-specific tag:internal -### @usage: JSRC_LIBRARY() # internal -module JSRC_LIBRARY: _BARE_UNIT { - .CMD=COMPILE_JSRC_MF - .EXTS=.java - .PEERDIR_POLICY=as_include - .FINAL_TARGET=no - .ALIASES=SRCS=FILES - PEERDIR_TAGS=JAVA_PROTO JAVA_FBS JAVA_IDL - MODULE_TYPE=LIBRARY - SET(MODULE_SUFFIX .jsrc) - SET(DONT_RESOLVE_INCLUDES yes) - SET(NEED_PLATFORM_PEERDIRS no) - SET(MODULE_LANG JAVA) - - NO_RUNTIME() -} - -# tag:maps-specific -@import "${CONF_ROOT}/conf/project_specific/maps/asrc.conf" - # tag:internal ### @usage: _PROXY_LIBRARY() # internal ### @@ -6745,6 +5925,7 @@ module _PROXY_LIBRARY: LIBRARY { } # tag:maps-specific +@import "${CONF_ROOT}/conf/project_specific/maps/asrc.conf" @import "${CONF_ROOT}/conf/project_specific/maps/aar.conf" @import "${CONF_ROOT}/conf/project_specific/maps/sproto.conf" @import "${CONF_ROOT}/conf/project_specific/maps/mapkit.conf" |