Browse Source

Restoring authorship annotation for <svidyuk@yandex-team.ru>. Commit 2 of 2.

svidyuk 3 years ago
parent
commit
287d7d8c4f

+ 172 - 172
build/conf/java.ymake.conf

@@ -1,179 +1,179 @@
-YMAKE_JAVA_MODULES=yes 
-JBUILD_JAVA_MODULES=no 
- 
-macro _INPUT_WITH_FLAG(Flag, IN[]) { 
-    .CMD=$_INPUT_WITH_FLAG_IMPL(${pre=$Flag :IN} IN $IN) 
-} 
- 
-macro _INPUT_WITH_FLAG_IMPL(IN{input}[], Args...) { 
-    .CMD=$Args ${input;hide:IN} 
-} 
- 
-macro ACCELEO(XSD{input}[], MTL{input}[], MTL_ROOT="${MODDIR}", LANG{input}[], OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], DEBUG?"stdout2stderr":"stderr2stdout") { 
+YMAKE_JAVA_MODULES=yes
+JBUILD_JAVA_MODULES=no
+
+macro _INPUT_WITH_FLAG(Flag, IN[]) {
+    .CMD=$_INPUT_WITH_FLAG_IMPL(${pre=$Flag :IN} IN $IN)
+}
+
+macro _INPUT_WITH_FLAG_IMPL(IN{input}[], Args...) {
+    .CMD=$Args ${input;hide:IN}
+}
+
+macro ACCELEO(XSD{input}[], MTL{input}[], MTL_ROOT="${MODDIR}", LANG{input}[], OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], DEBUG?"stdout2stderr":"stderr2stdout") {
     .PEERDIR=build/platform/java/jdk $JDK_RESOURCE_PEERDIR
-    .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input;pre=build/scripts/:DEBUG.py} $JDK_RESOURCE/bin/java -Dfile.encoding=utf8 -classpath ${RUN_JAR_PROG_CP_PRE}${tool:"tools/acceleo"}${RUN_JAR_PROG_CP_SUF} ru.yandex.se.logsng.tool.Cli $_INPUT_WITH_FLAG(--xsd IN $XSD) $_INPUT_WITH_FLAG(--mtl IN $MTL) $_INPUT_WITH_FLAG(--lang IN $LANG) --output-dir $BINDIR --build-root ${ARCADIA_BUILD_ROOT} --source-root ${ARCADIA_ROOT}  --mtl-root $MTL_ROOT ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${kv;hide:"p JV"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} 
-} 
- 
-### @usage: JAVA_LIBRARY() 
-### 
-### The module describing java library build. 
-### 
-### Documentation: https://wiki.yandex-team.ru/yatool/java/ 
-module JAVA_LIBRARY: JAR_LIBRARY { 
+    .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input;pre=build/scripts/:DEBUG.py} $JDK_RESOURCE/bin/java -Dfile.encoding=utf8 -classpath ${RUN_JAR_PROG_CP_PRE}${tool:"tools/acceleo"}${RUN_JAR_PROG_CP_SUF} ru.yandex.se.logsng.tool.Cli $_INPUT_WITH_FLAG(--xsd IN $XSD) $_INPUT_WITH_FLAG(--mtl IN $MTL) $_INPUT_WITH_FLAG(--lang IN $LANG) --output-dir $BINDIR --build-root ${ARCADIA_BUILD_ROOT} --source-root ${ARCADIA_ROOT}  --mtl-root $MTL_ROOT ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${kv;hide:"p JV"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
+}
+
+### @usage: JAVA_LIBRARY()
+###
+### The module describing java library build.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/
+module JAVA_LIBRARY: JAR_LIBRARY {
     .ALIASES=REQUIREMENTS=JAVA_REQUIREMENTS
-} 
- 
-### @usage: JAVA_PROGRAM() 
-### 
-### The module describing java programs build. 
-### Output artifacts: .jar and directory with all the jar to the classpath of the formation. 
-### 
-### Documentation: https://wiki.yandex-team.ru/yatool/java/ 
-multimodule JAVA_PROGRAM { 
-    module JAR_RUNABLE: _JAR_RUNABLE { 
-        .ALLOWED=JAVA_RUNTIME_PEERDIR JAVA_RUNTIME_EXCLUDE 
-        # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle: 
-        # * A -> B -> C -> lib-v1.4 
-        #    |    |-> DM(lib-v1.1) 
-        #    |    |-> EXCLUDE(lib-v1.4) 
-        #    |    |-> FORBID_CONFLICT_DM_RECENT = OK 
-        #    |-> DM(lib-v1.1) 
-        #    |-> FORBID_CONFLICT_DM_RECENT = FAIL (because downgrade from v1.4 to v1.1 is detected before understanding that v1.4 was excuded on the examined path) 
-        .IGNORED=RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION 
-        .ALIASES=JAVA_RUNTIME_PEERDIR=PEERDIR JAVA_RUNTIME_EXCLUDE=EXCLUDE 
-        .PEERDIRSELF=JAR_COMPILATION 
- 
-        SET(MODULE_TYPE JAVA_PROGRAM) 
-    } 
-    module JAR_COMPILATION: JAR_LIBRARY { 
-        .IGNORED=JAVA_RUNTIME_PEERDIR JAVA_RUNTIME_EXCLUDE 
+}
+
+### @usage: JAVA_PROGRAM()
+###
+### The module describing java programs build.
+### Output artifacts: .jar and directory with all the jar to the classpath of the formation.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/
+multimodule JAVA_PROGRAM {
+    module JAR_RUNABLE: _JAR_RUNABLE {
+        .ALLOWED=JAVA_RUNTIME_PEERDIR JAVA_RUNTIME_EXCLUDE
+        # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle:
+        # * A -> B -> C -> lib-v1.4
+        #    |    |-> DM(lib-v1.1)
+        #    |    |-> EXCLUDE(lib-v1.4)
+        #    |    |-> FORBID_CONFLICT_DM_RECENT = OK
+        #    |-> DM(lib-v1.1)
+        #    |-> FORBID_CONFLICT_DM_RECENT = FAIL (because downgrade from v1.4 to v1.1 is detected before understanding that v1.4 was excuded on the examined path)
+        .IGNORED=RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION
+        .ALIASES=JAVA_RUNTIME_PEERDIR=PEERDIR JAVA_RUNTIME_EXCLUDE=EXCLUDE
+        .PEERDIRSELF=JAR_COMPILATION
+
+        SET(MODULE_TYPE JAVA_PROGRAM)
+    }
+    module JAR_COMPILATION: JAR_LIBRARY {
+        .IGNORED=JAVA_RUNTIME_PEERDIR JAVA_RUNTIME_EXCLUDE
         .ALIASES=JAVA_RUNTIME_PEERDIR=_NOOP_MACRO JAVA_RUNTIME_EXCLUDE=_NOOP_MACRO REQUIREMENTS=JAVA_REQUIREMENTS
-        .FINAL_TARGET=no 
-        SET(MODULE_TYPE JAVA_PROGRAM) 
-    } 
-} 
- 
-multimodule JUNIT5 { 
-    module JAR_TESTABLE: _JAR_TEST { 
-        .ALLOWED=YT_SPEC 
-        # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle: 
-        # * A -> B -> C -> lib-v1.4 
-        #    |    |-> DM(lib-v1.1) 
-        #    |    |-> EXCLUDE(lib-v1.4) 
-        #    |    |-> FORBID_CONFLICT_DM_RECENT = OK 
-        #    |-> DM(lib-v1.1) 
-        #    |-> FORBID_CONFLICT_DM_RECENT = FAIL (because downgrade from v1.4 to v1.1 is detected before understanding that v1.4 was excuded on the examined path) 
-        .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION 
-        .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE 
-        .PEERDIRSELF=JAR_COMPILATION 
- 
-        SET(MODULE_TYPE JUNIT5) 
-    } 
-    module JAR_COMPILATION: JAR_LIBRARY { 
-        .ALLOWED=YT_SPEC 
-        .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO 
-        .FINAL_TARGET=no 
- 
-        PEERDIR(devtools/junit5-runner build/platform/java/jacoco-agent) 
-        SET(MODULE_TYPE JUNIT5) 
-    } 
-} 
- 
-multimodule JTEST { 
-    module JAR_TESTABLE: _JAR_TEST { 
-        .ALLOWED=YT_SPEC 
-        # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle: 
-        # * A -> B -> C -> lib-v1.4 
-        #    |    |-> DM(lib-v1.1) 
-        #    |    |-> EXCLUDE(lib-v1.4) 
-        #    |    |-> FORBID_CONFLICT_DM_RECENT = OK 
-        #    |-> DM(lib-v1.1) 
-        #    |-> FORBID_CONFLICT_DM_RECENT = FAIL (because downgrade from v1.4 to v1.1 is detected before understanding that v1.4 was excuded on the examined path) 
-        .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION 
-        .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE 
-        .PEERDIRSELF=JAR_COMPILATION 
- 
-        SET(MODULE_TYPE JTEST) 
-        PEERDIR(devtools/junit-runner) 
-        DEPENDENCY_MANAGEMENT(contrib/java/com/google/code/gson/gson/2.8.6 contrib/java/com/beust/jcommander/1.72 contrib/java/junit/junit/4.12) 
-    } 
-    module JAR_COMPILATION: JAR_LIBRARY { 
-        .ALLOWED=YT_SPEC 
-        .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO 
-        .FINAL_TARGET=no 
- 
-        SET(MODULE_TYPE JTEST) 
-        DEPENDS(contrib/java/org/sonarsource/scanner/cli/sonar-scanner-cli/2.8) 
-        PEERDIR(build/platform/java/jacoco-agent) 
-    } 
-} 
- 
-multimodule JTEST_FOR { 
-    module JAR_TESTABLE: _JAR_TEST { 
-        .ALLOWED=YT_SPEC 
-        # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle: 
-        # * A -> B -> C -> lib-v1.4 
-        #    |    |-> DM(lib-v1.1) 
-        #    |    |-> EXCLUDE(lib-v1.4) 
-        #    |    |-> FORBID_CONFLICT_DM_RECENT = OK 
-        #    |-> DM(lib-v1.1) 
-        #    |-> FORBID_CONFLICT_DM_RECENT = FAIL (because downgrade from v1.4 to v1.1 is detected before understanding that v1.4 was excuded on the examined path) 
-        .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION 
-        .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE 
-        .PEERDIRSELF=JAR_COMPILATION 
- 
-        SET(MODULE_TYPE JTEST_FOR) 
-        PEERDIR(${UNITTEST_DIR} devtools/junit-runner) 
-        DEPENDENCY_MANAGEMENT(contrib/java/com/google/code/gson/gson/2.8.6 contrib/java/com/beust/jcommander/1.72 contrib/java/junit/junit/4.12) 
-    } 
-    module JAR_COMPILATION: JAR_LIBRARY { 
-        .ALLOWED=YT_SPEC 
-        .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO 
-        .FINAL_TARGET=no 
- 
-        SET(MODULE_TYPE JTEST_FOR) 
-        DEPENDS(contrib/java/org/sonarsource/scanner/cli/sonar-scanner-cli/2.8) 
-        PEERDIR(devtools/junit-runner build/platform/java/jacoco-agent ${UNITTEST_DIR}) 
-    } 
-} 
- 
-multimodule JAVA_CONTRIB_PROGRAM { 
-    module JAR_RUNABLE: _JAR_RUNABLE { 
-        .IGNORED=JAVA_SRCS RUN_JAR_PROGRAM RUN_JAVA_PROGRAM JAR_RESOURCE SRC_RESOURCE LOCAL_JAR 
-        .PEERDIRSELF=JAR_COMPILATION 
- 
-        SET(MODULE_TYPE JAVA_PROGRAM) 
-        ENABLE(DISABLE_SCRIPTGEN) 
-    } 
-    module JAR_COMPILATION: JAVA_CONTRIB { 
-        .ALIASES=JAVA_RUNTIME_PEERDIR=_NOOP_MACRO JAVA_RUNTIME_EXCLUDE=_NOOP_MACRO 
-        .FINAL_TARGET=no 
-    } 
-} 
- 
-module _DLL_COMPATIBLE_JAVA_LIBRARY: EXTERNAL_JAVA_LIBRARY { 
+        .FINAL_TARGET=no
+        SET(MODULE_TYPE JAVA_PROGRAM)
+    }
+}
+
+multimodule JUNIT5 {
+    module JAR_TESTABLE: _JAR_TEST {
+        .ALLOWED=YT_SPEC
+        # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle:
+        # * A -> B -> C -> lib-v1.4
+        #    |    |-> DM(lib-v1.1)
+        #    |    |-> EXCLUDE(lib-v1.4)
+        #    |    |-> FORBID_CONFLICT_DM_RECENT = OK
+        #    |-> DM(lib-v1.1)
+        #    |-> FORBID_CONFLICT_DM_RECENT = FAIL (because downgrade from v1.4 to v1.1 is detected before understanding that v1.4 was excuded on the examined path)
+        .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION
+        .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE
+        .PEERDIRSELF=JAR_COMPILATION
+
+        SET(MODULE_TYPE JUNIT5)
+    }
+    module JAR_COMPILATION: JAR_LIBRARY {
+        .ALLOWED=YT_SPEC
+        .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO
+        .FINAL_TARGET=no
+
+        PEERDIR(devtools/junit5-runner build/platform/java/jacoco-agent)
+        SET(MODULE_TYPE JUNIT5)
+    }
+}
+
+multimodule JTEST {
+    module JAR_TESTABLE: _JAR_TEST {
+        .ALLOWED=YT_SPEC
+        # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle:
+        # * A -> B -> C -> lib-v1.4
+        #    |    |-> DM(lib-v1.1)
+        #    |    |-> EXCLUDE(lib-v1.4)
+        #    |    |-> FORBID_CONFLICT_DM_RECENT = OK
+        #    |-> DM(lib-v1.1)
+        #    |-> FORBID_CONFLICT_DM_RECENT = FAIL (because downgrade from v1.4 to v1.1 is detected before understanding that v1.4 was excuded on the examined path)
+        .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION
+        .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE
+        .PEERDIRSELF=JAR_COMPILATION
+
+        SET(MODULE_TYPE JTEST)
+        PEERDIR(devtools/junit-runner)
+        DEPENDENCY_MANAGEMENT(contrib/java/com/google/code/gson/gson/2.8.6 contrib/java/com/beust/jcommander/1.72 contrib/java/junit/junit/4.12)
+    }
+    module JAR_COMPILATION: JAR_LIBRARY {
+        .ALLOWED=YT_SPEC
+        .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO
+        .FINAL_TARGET=no
+
+        SET(MODULE_TYPE JTEST)
+        DEPENDS(contrib/java/org/sonarsource/scanner/cli/sonar-scanner-cli/2.8)
+        PEERDIR(build/platform/java/jacoco-agent)
+    }
+}
+
+multimodule JTEST_FOR {
+    module JAR_TESTABLE: _JAR_TEST {
+        .ALLOWED=YT_SPEC
+        # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle:
+        # * A -> B -> C -> lib-v1.4
+        #    |    |-> DM(lib-v1.1)
+        #    |    |-> EXCLUDE(lib-v1.4)
+        #    |    |-> FORBID_CONFLICT_DM_RECENT = OK
+        #    |-> DM(lib-v1.1)
+        #    |-> FORBID_CONFLICT_DM_RECENT = FAIL (because downgrade from v1.4 to v1.1 is detected before understanding that v1.4 was excuded on the examined path)
+        .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION
+        .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE
+        .PEERDIRSELF=JAR_COMPILATION
+
+        SET(MODULE_TYPE JTEST_FOR)
+        PEERDIR(${UNITTEST_DIR} devtools/junit-runner)
+        DEPENDENCY_MANAGEMENT(contrib/java/com/google/code/gson/gson/2.8.6 contrib/java/com/beust/jcommander/1.72 contrib/java/junit/junit/4.12)
+    }
+    module JAR_COMPILATION: JAR_LIBRARY {
+        .ALLOWED=YT_SPEC
+        .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO
+        .FINAL_TARGET=no
+
+        SET(MODULE_TYPE JTEST_FOR)
+        DEPENDS(contrib/java/org/sonarsource/scanner/cli/sonar-scanner-cli/2.8)
+        PEERDIR(devtools/junit-runner build/platform/java/jacoco-agent ${UNITTEST_DIR})
+    }
+}
+
+multimodule JAVA_CONTRIB_PROGRAM {
+    module JAR_RUNABLE: _JAR_RUNABLE {
+        .IGNORED=JAVA_SRCS RUN_JAR_PROGRAM RUN_JAVA_PROGRAM JAR_RESOURCE SRC_RESOURCE LOCAL_JAR
+        .PEERDIRSELF=JAR_COMPILATION
+
+        SET(MODULE_TYPE JAVA_PROGRAM)
+        ENABLE(DISABLE_SCRIPTGEN)
+    }
+    module JAR_COMPILATION: JAVA_CONTRIB {
+        .ALIASES=JAVA_RUNTIME_PEERDIR=_NOOP_MACRO JAVA_RUNTIME_EXCLUDE=_NOOP_MACRO
+        .FINAL_TARGET=no
+    }
+}
+
+module _DLL_COMPATIBLE_JAVA_LIBRARY: EXTERNAL_JAVA_LIBRARY {
     SET(DONT_RESOLVE_INCLUDES yes)
-} 
- 
-### @usage: DLL_JAVA() 
-### 
-### DLL built using swig for Java. Produces dynamic library and a .jar. 
-### Dynamic library is treated the same as in the case of PEERDIR from Java to DLL. 
-### .jar goes on the classpath. 
-### 
-### Documentation: https://wiki.yandex-team.ru/yatool/java/#integracijascpp/pythonsborkojj 
-multimodule DLL_JAVA { 
-    module JNI_DLL: DLL { 
-        .ALIASES=SRCS=_SWIG_LANG_FILTERED_SRCS 
-        SET(SWIG_LANG jni_cpp) 
+}
+
+### @usage: DLL_JAVA()
+###
+### DLL built using swig for Java. Produces dynamic library and a .jar.
+### Dynamic library is treated the same as in the case of PEERDIR from Java to DLL.
+### .jar goes on the classpath.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/#integracijascpp/pythonsborkojj
+multimodule DLL_JAVA {
+    module JNI_DLL: DLL {
+        .ALIASES=SRCS=_SWIG_LANG_FILTERED_SRCS
+        SET(SWIG_LANG jni_cpp)
         .FINAL_TARGET=no
-    } 
-    module JAR_COMPILATION: _DLL_COMPATIBLE_JAVA_LIBRARY { 
-        .ALIASES=SRCS=_SWIG_LANG_FILTERED_SRCS PEERDIR=_NOOP_MACRO 
-        .PEERDIRSELF=JNI_DLL 
-        SET(SWIG_LANG jni_java) 
-        PEERDIR+=build/platform/java/jdk 
+    }
+    module JAR_COMPILATION: _DLL_COMPATIBLE_JAVA_LIBRARY {
+        .ALIASES=SRCS=_SWIG_LANG_FILTERED_SRCS PEERDIR=_NOOP_MACRO
+        .PEERDIRSELF=JNI_DLL
+        SET(SWIG_LANG jni_java)
+        PEERDIR+=build/platform/java/jdk
         PEERDIR+=$JDK_RESOURCE_PEERDIR
         .FINAL_TARGET=yes
-    } 
-} 
+    }
+}

+ 121 - 121
build/conf/jbuild.ymake.conf

@@ -1,122 +1,122 @@
-YMAKE_JAVA_MODULES=no 
-JBUILD_JAVA_MODULES=yes 
- 
-EXTERNAL_JAR_VALUE= 
-### @usage: EXTERNAL_JAR(library.jar) 
-### 
-### Provide an external name for built JAVA_LIBRARY() or JAVA_PROGRAM() 
-### 
-### Documentation: https://wiki.yandex-team.ru/yatool/java/#ispolzovanievneshnixmavenbibliotek 
-macro EXTERNAL_JAR(Args...) { 
-    SET_APPEND(EXTERNAL_JAR_VALUE $ARGS_DELIM $Args) 
-} 
- 
-### @usage: JAVA_LIBRARY() 
-### 
-### The module describing java library build. 
-### 
-### Documentation: https://wiki.yandex-team.ru/yatool/java/ 
-module JAVA_LIBRARY: _JAVA_PLACEHOLDER { 
-    SET(MODULE_TYPE JAVA_LIBRARY) 
-} 
- 
-### @usage: JAVA_PROGRAM() 
-### 
-### The module describing java programs build. 
-### Output artifacts: .jar and directory with all the jar to the classpath of the formation. 
-### 
-### Documentation: https://wiki.yandex-team.ru/yatool/java/ 
-module JAVA_PROGRAM: _JAVA_PLACEHOLDER { 
-    .ALIASES=JAVA_RUNTIME_PEERDIR=PEERDIR JAVA_RUNTIME_EXCLUDE=EXCLUDE 
-    SET(MODULE_TYPE JAVA_PROGRAM) 
-} 
- 
-### @usage: JUNIT5() 
-### 
-### Java tests module based on JUnit 5 framework. 
-### 
-### If requested, build system will scan the source code of the module for the presence of junit tests and run them. 
-### Output artifacts: a jar, a directory of exhaust tests(if required run the tests) - test logs, system logs testiranja, temporary files, tests, etc. 
-### 
-### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynajava 
-module JUNIT5: _JAVA_PLACEHOLDER { 
-    .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE 
-    SET(MODULE_TYPE JUNIT5) 
-    SET(TEST_RUNNER devtools/junit5-runner) 
-    SET(TEST_CLASSPATH_VALUE ${MODDIR} ${TEST_RUNNER}) 
-    # Used as place to add managed dependencies for test execution and take them into account 
-    # during traverses properly. 
-    _RUN_JAVA(TOOL ${TEST_RUNNER} OUT fake.out.java_test_cmd) 
- 
-    PEERDIR(${TEST_RUNNER}) 
-    PEERDIR(build/platform/java/jacoco-agent) 
-    JAVA_TEST() 
-} 
- 
-### @usage: JTEST() 
-### 
-### Java tests module based on JUnit 4 framework. 
-### 
-### If requested, build system will scan the source code of the module for the presence of junit tests and run them. 
-### Output artifacts: a jar, a directory of exhaust tests(if required run the tests) - test logs, system logs testiranja, temporary files, tests, etc. 
-### 
-### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynajava 
-module JTEST: _JAVA_PLACEHOLDER { 
-    .ALLOWED=YT_SPEC 
-    .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE 
-    SET(MODULE_TYPE JTEST) 
-    SET(TEST_RUNNER devtools/junit-runner) 
-    SET(TEST_CLASSPATH_VALUE ${MODDIR} ${TEST_RUNNER}) 
-    # Used as place to add managed dependencies for test execution and take them into account 
-    # during traverses properly. 
-    _RUN_JAVA(TOOL ${TEST_RUNNER} OUT fake.out.java_test_cmd) 
- 
-    # TODO: if <needs_sonar> 
-    DEPENDS(contrib/java/org/sonarsource/scanner/cli/sonar-scanner-cli/2.8) 
-    DEPENDS(${TEST_RUNNER}) 
-    _GHOST_PEERDIR(${TEST_RUNNER}) 
-    PEERDIR(build/platform/java/jacoco-agent) 
-    JAVA_TEST() 
- 
-    SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json) 
-} 
- 
-### @usage: JTEST_FOR(ModuleDir) 
-### 
-### Convinience java tests module based on JUnit 4 framework for specified library or program. 
-### 
-### In contrast to the JTEST, the build system will scan for the presence of the test sources of the module in ModuleDir . As ModuleDir should contain JAVA_PROGRAM or JAVA_LIBRARY . JTEST_FOR also can have its own source, in this case they will be compiled and added to the classpath of a test run. 
-### Output artifacts: a jar, a directory of exhaust tests(if requested tests are run). 
-### 
-### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynajava 
-module JTEST_FOR: JTEST { 
-    .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE 
-    SET(MODULE_TYPE JTEST_FOR) 
-    SET(TEST_CLASSPATH_VALUE ${MODDIR} ${TEST_RUNNER} ${UNITTEST_DIR}) 
- 
-    PEERDIR($UNITTEST_DIR) 
-    SET(REALPRJNAME jtest) 
-    JAVA_TEST() 
-} 
- 
-module JAVA_CONTRIB_PROGRAM: JAVA_CONTRIB { 
-    SET(MODULE_TYPE JAVA_PROGRAM) 
-    ENABLE(DISABLE_SCRIPTGEN) 
-} 
- 
-### @usage: DLL_JAVA() 
-### 
-### DLL built using swig for Java. Produces dynamic library and a .jar. 
-### Dynamic library is treated the same as in the case of PEERDIR from Java to DLL. 
-### .jar goes on the classpath. 
-### 
-### Documentation: https://wiki.yandex-team.ru/yatool/java/#integracijascpp/pythonsborkojj 
-module DLL_JAVA: DLL { 
-    .EXTS=.o .obj .jsrc .java .mf 
-    .CMD=SWIG_DLL_JAR_CMD 
-    PEERDIR(build/platform/java/jdk) 
+YMAKE_JAVA_MODULES=no
+JBUILD_JAVA_MODULES=yes
+
+EXTERNAL_JAR_VALUE=
+### @usage: EXTERNAL_JAR(library.jar)
+###
+### Provide an external name for built JAVA_LIBRARY() or JAVA_PROGRAM()
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/#ispolzovanievneshnixmavenbibliotek
+macro EXTERNAL_JAR(Args...) {
+    SET_APPEND(EXTERNAL_JAR_VALUE $ARGS_DELIM $Args)
+}
+
+### @usage: JAVA_LIBRARY()
+###
+### The module describing java library build.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/
+module JAVA_LIBRARY: _JAVA_PLACEHOLDER {
+    SET(MODULE_TYPE JAVA_LIBRARY)
+}
+
+### @usage: JAVA_PROGRAM()
+###
+### The module describing java programs build.
+### Output artifacts: .jar and directory with all the jar to the classpath of the formation.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/
+module JAVA_PROGRAM: _JAVA_PLACEHOLDER {
+    .ALIASES=JAVA_RUNTIME_PEERDIR=PEERDIR JAVA_RUNTIME_EXCLUDE=EXCLUDE
+    SET(MODULE_TYPE JAVA_PROGRAM)
+}
+
+### @usage: JUNIT5()
+###
+### Java tests module based on JUnit 5 framework.
+###
+### If requested, build system will scan the source code of the module for the presence of junit tests and run them.
+### Output artifacts: a jar, a directory of exhaust tests(if required run the tests) - test logs, system logs testiranja, temporary files, tests, etc.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynajava
+module JUNIT5: _JAVA_PLACEHOLDER {
+    .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE
+    SET(MODULE_TYPE JUNIT5)
+    SET(TEST_RUNNER devtools/junit5-runner)
+    SET(TEST_CLASSPATH_VALUE ${MODDIR} ${TEST_RUNNER})
+    # Used as place to add managed dependencies for test execution and take them into account
+    # during traverses properly.
+    _RUN_JAVA(TOOL ${TEST_RUNNER} OUT fake.out.java_test_cmd)
+
+    PEERDIR(${TEST_RUNNER})
+    PEERDIR(build/platform/java/jacoco-agent)
+    JAVA_TEST()
+}
+
+### @usage: JTEST()
+###
+### Java tests module based on JUnit 4 framework.
+###
+### If requested, build system will scan the source code of the module for the presence of junit tests and run them.
+### Output artifacts: a jar, a directory of exhaust tests(if required run the tests) - test logs, system logs testiranja, temporary files, tests, etc.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynajava
+module JTEST: _JAVA_PLACEHOLDER {
+    .ALLOWED=YT_SPEC
+    .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE
+    SET(MODULE_TYPE JTEST)
+    SET(TEST_RUNNER devtools/junit-runner)
+    SET(TEST_CLASSPATH_VALUE ${MODDIR} ${TEST_RUNNER})
+    # Used as place to add managed dependencies for test execution and take them into account
+    # during traverses properly.
+    _RUN_JAVA(TOOL ${TEST_RUNNER} OUT fake.out.java_test_cmd)
+
+    # TODO: if <needs_sonar>
+    DEPENDS(contrib/java/org/sonarsource/scanner/cli/sonar-scanner-cli/2.8)
+    DEPENDS(${TEST_RUNNER})
+    _GHOST_PEERDIR(${TEST_RUNNER})
+    PEERDIR(build/platform/java/jacoco-agent)
+    JAVA_TEST()
+
+    SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
+}
+
+### @usage: JTEST_FOR(ModuleDir)
+###
+### Convinience java tests module based on JUnit 4 framework for specified library or program.
+###
+### In contrast to the JTEST, the build system will scan for the presence of the test sources of the module in ModuleDir . As ModuleDir should contain JAVA_PROGRAM or JAVA_LIBRARY . JTEST_FOR also can have its own source, in this case they will be compiled and added to the classpath of a test run.
+### Output artifacts: a jar, a directory of exhaust tests(if requested tests are run).
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynajava
+module JTEST_FOR: JTEST {
+    .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE
+    SET(MODULE_TYPE JTEST_FOR)
+    SET(TEST_CLASSPATH_VALUE ${MODDIR} ${TEST_RUNNER} ${UNITTEST_DIR})
+
+    PEERDIR($UNITTEST_DIR)
+    SET(REALPRJNAME jtest)
+    JAVA_TEST()
+}
+
+module JAVA_CONTRIB_PROGRAM: JAVA_CONTRIB {
+    SET(MODULE_TYPE JAVA_PROGRAM)
+    ENABLE(DISABLE_SCRIPTGEN)
+}
+
+### @usage: DLL_JAVA()
+###
+### DLL built using swig for Java. Produces dynamic library and a .jar.
+### Dynamic library is treated the same as in the case of PEERDIR from Java to DLL.
+### .jar goes on the classpath.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/#integracijascpp/pythonsborkojj
+module DLL_JAVA: DLL {
+    .EXTS=.o .obj .jsrc .java .mf
+    .CMD=SWIG_DLL_JAR_CMD
+    PEERDIR(build/platform/java/jdk)
     PEERDIR+=$JDK_RESOURCE_PEERDIR
- 
-    PROPAGATES_MANAGEABLE_PEERS=yes 
-    SET(SWIG_LANG java) 
-} 
+
+    PROPAGATES_MANAGEABLE_PEERS=yes
+    SET(SWIG_LANG java)
+}

+ 10 - 10
build/platform/java/kythe/ya.make

@@ -1,10 +1,10 @@
-RESOURCES_LIBRARY() 
-OWNER(g:ymake) 
- 
-IF(USE_SYSTEM_KYTHE) 
-    MESSAGE(WARNING System Kythe $USE_SYSTEM_KYTHE will be used) 
-ELSE() 
-    DECLARE_EXTERNAL_RESOURCE(KYTHE sbr:837801347) 
-ENDIF() 
- 
-END() 
+RESOURCES_LIBRARY()
+OWNER(g:ymake)
+
+IF(USE_SYSTEM_KYTHE)
+    MESSAGE(WARNING System Kythe $USE_SYSTEM_KYTHE will be used)
+ELSE()
+    DECLARE_EXTERNAL_RESOURCE(KYTHE sbr:837801347)
+ENDIF()
+
+END()

+ 22 - 22
build/platform/java/scriptgen/ya.make

@@ -1,27 +1,27 @@
-RESOURCES_LIBRARY() 
-OWNER(g:ymake) 
- 
-SET(SCRIPTGEN_LINUX sbr:2654452283) 
-SET(SCRIPTGEN_DARWIN_ARM64 sbr:2654451866) 
-SET(SCRIPTGEN_DARWIN sbr:2654452096) 
-SET(SCRIPTGEN_WIN32 sbr:2654451225) 
- 
-DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE( 
-    SCRIPTGEN 
-    ${SCRIPTGEN_LINUX} FOR LINUX 
-    ${SCRIPTGEN_DARWIN} FOR DARWIN 
+RESOURCES_LIBRARY()
+OWNER(g:ymake)
+
+SET(SCRIPTGEN_LINUX sbr:2654452283)
+SET(SCRIPTGEN_DARWIN_ARM64 sbr:2654451866)
+SET(SCRIPTGEN_DARWIN sbr:2654452096)
+SET(SCRIPTGEN_WIN32 sbr:2654451225)
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+    SCRIPTGEN
+    ${SCRIPTGEN_LINUX} FOR LINUX
+    ${SCRIPTGEN_DARWIN} FOR DARWIN
     ${SCRIPTGEN_DARWIN_ARM64} FOR DARWIN-ARM64
-    ${SCRIPTGEN_WIN32} FOR WIN32 
-) 
- 
+    ${SCRIPTGEN_WIN32} FOR WIN32
+)
+
 IF(OS_DARWIN AND ARCH_ARM64)
     DECLARE_EXTERNAL_RESOURCE(WITH_SCRIPTGEN ${SCRIPTGEN_DARWIN_ARM64})
 ELSEIF(OS_DARWIN AND ARCH_X86_64)
-    DECLARE_EXTERNAL_RESOURCE(WITH_SCRIPTGEN ${SCRIPTGEN_DARWIN}) 
-ELSEIF(OS_LINUX) 
-    DECLARE_EXTERNAL_RESOURCE(WITH_SCRIPTGEN ${SCRIPTGEN_LINUX}) 
-ELSEIF(OS_WINDOWS) 
-    DECLARE_EXTERNAL_RESOURCE(WITH_SCRIPTGEN ${SCRIPTGEN_WIN32}) 
-ENDIF() 
- 
+    DECLARE_EXTERNAL_RESOURCE(WITH_SCRIPTGEN ${SCRIPTGEN_DARWIN})
+ELSEIF(OS_LINUX)
+    DECLARE_EXTERNAL_RESOURCE(WITH_SCRIPTGEN ${SCRIPTGEN_LINUX})
+ELSEIF(OS_WINDOWS)
+    DECLARE_EXTERNAL_RESOURCE(WITH_SCRIPTGEN ${SCRIPTGEN_WIN32})
+ENDIF()
+
 END()

+ 1 - 1
build/platform/java/ya.make

@@ -6,5 +6,5 @@ RECURSE(
     jacoco-agent
     kotlin
     jstyle_lib
-    scriptgen 
+    scriptgen
 )

+ 8 - 8
build/platform/python/python310/ya.make

@@ -7,14 +7,14 @@ OWNER(
 
 INCLUDE(${ARCADIA_ROOT}/build/platform/python/resources.inc)
 
-DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE( 
-    PYTHON310 
-    ${PYTHON310_DARWIN} FOR DARWIN 
-    ${PYTHON310_DARWIN_ARM64} FOR DARWIN-ARM64 
-    ${PYTHON310_LINUX} FOR LINUX 
-    ${PYTHON310_WINDOWS} FOR WIN32 
-) 
- 
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+    PYTHON310
+    ${PYTHON310_DARWIN} FOR DARWIN
+    ${PYTHON310_DARWIN_ARM64} FOR DARWIN-ARM64
+    ${PYTHON310_LINUX} FOR LINUX
+    ${PYTHON310_WINDOWS} FOR WIN32
+)
+
 IF (OS_LINUX)
     DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON310 ${PYTHON310_LINUX})
 ELSEIF (OS_DARWIN)

+ 33 - 33
build/platform/python/ymake_python3/ya.make

@@ -1,33 +1,33 @@
-RESOURCES_LIBRARY() 
- 
-OWNER( 
-    g:arcadia-devtools 
-    g:yatool 
-) 
- 
-SET(YMAKE_PYTHON3_LINUX sbr:2693706966) 
-SET(YMAKE_PYTHON3_DARWIN sbr:2693705780) 
-SET(YMAKE_PYTHON3_DARWIN_ARM64 sbr:2693704462) 
-SET(YMAKE_PYTHON3_WINDOWS sbr:2693706398) 
- 
-DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE( 
-    YMAKE_PYTHON3 
-    ${YMAKE_PYTHON3_DARWIN} FOR DARWIN 
-    ${YMAKE_PYTHON3_DARWIN_ARM64} FOR DARWIN-ARM64 
-    ${YMAKE_PYTHON3_LINUX} FOR LINUX 
-    ${YMAKE_PYTHON3_WINDOWS} FOR WIN32 
-) 
- 
-IF (OS_LINUX) 
-    DECLARE_EXTERNAL_RESOURCE(EXTERNAL_YMAKE_PYTHON3 ${YMAKE_PYTHON3_LINUX}) 
-ELSEIF (OS_DARWIN) 
-    IF (ARCH_ARM64) 
-        DECLARE_EXTERNAL_RESOURCE(EXTERNAL_YMAKE_PYTHON3 ${YMAKE_PYTHON3_DARWIN_ARM64}) 
-    ELSEIF(ARCH_X86_64) 
-        DECLARE_EXTERNAL_RESOURCE(EXTERNAL_YMAKE_PYTHON3 ${YMAKE_PYTHON3_DARWIN}) 
-    ENDIF() 
-ELSEIF (OS_WINDOWS) 
-    DECLARE_EXTERNAL_RESOURCE(EXTERNAL_YMAKE_PYTHON3 ${YMAKE_PYTHON3_WINDOWS}) 
-ENDIF() 
- 
-END() 
+RESOURCES_LIBRARY()
+
+OWNER(
+    g:arcadia-devtools
+    g:yatool
+)
+
+SET(YMAKE_PYTHON3_LINUX sbr:2693706966)
+SET(YMAKE_PYTHON3_DARWIN sbr:2693705780)
+SET(YMAKE_PYTHON3_DARWIN_ARM64 sbr:2693704462)
+SET(YMAKE_PYTHON3_WINDOWS sbr:2693706398)
+
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+    YMAKE_PYTHON3
+    ${YMAKE_PYTHON3_DARWIN} FOR DARWIN
+    ${YMAKE_PYTHON3_DARWIN_ARM64} FOR DARWIN-ARM64
+    ${YMAKE_PYTHON3_LINUX} FOR LINUX
+    ${YMAKE_PYTHON3_WINDOWS} FOR WIN32
+)
+
+IF (OS_LINUX)
+    DECLARE_EXTERNAL_RESOURCE(EXTERNAL_YMAKE_PYTHON3 ${YMAKE_PYTHON3_LINUX})
+ELSEIF (OS_DARWIN)
+    IF (ARCH_ARM64)
+        DECLARE_EXTERNAL_RESOURCE(EXTERNAL_YMAKE_PYTHON3 ${YMAKE_PYTHON3_DARWIN_ARM64})
+    ELSEIF(ARCH_X86_64)
+        DECLARE_EXTERNAL_RESOURCE(EXTERNAL_YMAKE_PYTHON3 ${YMAKE_PYTHON3_DARWIN})
+    ENDIF()
+ELSEIF (OS_WINDOWS)
+    DECLARE_EXTERNAL_RESOURCE(EXTERNAL_YMAKE_PYTHON3 ${YMAKE_PYTHON3_WINDOWS})
+ENDIF()
+
+END()

+ 158 - 158
build/plugins/java.py

@@ -31,7 +31,7 @@ def extract_macro_calls2(unit, macro_value_name):
     return calls
 
 
-def on_run_jbuild_program(unit, *args): 
+def on_run_jbuild_program(unit, *args):
     args = list(args)
     """
     Custom code generation
@@ -76,31 +76,31 @@ def ongenerate_script(unit, *args):
 
 def onjava_module(unit, *args):
     args_delim = unit.get('ARGS_DELIM')
-    idea_only = True if 'IDEA_ONLY' in args else False 
-
-    if idea_only: 
-        if unit.get('YA_IDE_IDEA') != 'yes': 
-            return 
-        if unit.get('YMAKE_JAVA_MODULES') != 'yes': 
-            return 
- 
+    idea_only = True if 'IDEA_ONLY' in args else False
+
+    if idea_only:
+        if unit.get('YA_IDE_IDEA') != 'yes':
+            return
+        if unit.get('YMAKE_JAVA_MODULES') != 'yes':
+            return
+
     data = {
         'BUNDLE_NAME': unit.name(),
         'PATH': unit.path(),
-        'IDEA_ONLY': 'yes' if idea_only else 'no', 
+        'IDEA_ONLY': 'yes' if idea_only else 'no',
         'MODULE_TYPE': unit.get('MODULE_TYPE'),
         'MODULE_ARGS': unit.get('MODULE_ARGS'),
-        'MANAGED_PEERS': '${MANAGED_PEERS}', 
-        'MANAGED_PEERS_CLOSURE': '${MANAGED_PEERS_CLOSURE}', 
-        'NON_NAMAGEABLE_PEERS': '${NON_NAMAGEABLE_PEERS}', 
-        'TEST_CLASSPATH_MANAGED': '${TEST_CLASSPATH_MANAGED}', 
+        'MANAGED_PEERS': '${MANAGED_PEERS}',
+        'MANAGED_PEERS_CLOSURE': '${MANAGED_PEERS_CLOSURE}',
+        'NON_NAMAGEABLE_PEERS': '${NON_NAMAGEABLE_PEERS}',
+        'TEST_CLASSPATH_MANAGED': '${TEST_CLASSPATH_MANAGED}',
         'EXCLUDE': extract_macro_calls(unit, 'EXCLUDE_VALUE', args_delim),
         'JAVA_SRCS': extract_macro_calls(unit, 'JAVA_SRCS_VALUE', args_delim),
         'JAVAC_FLAGS': extract_macro_calls(unit, 'JAVAC_FLAGS_VALUE', args_delim),
         'ANNOTATION_PROCESSOR': extract_macro_calls(unit, 'ANNOTATION_PROCESSOR_VALUE', args_delim),
         'EXTERNAL_JAR': extract_macro_calls(unit, 'EXTERNAL_JAR_VALUE', args_delim),
         'RUN_JAVA_PROGRAM': extract_macro_calls2(unit, 'RUN_JAVA_PROGRAM_VALUE'),
-        'RUN_JAVA_PROGRAM_MANAGED': '${RUN_JAVA_PROGRAM_MANAGED}', 
+        'RUN_JAVA_PROGRAM_MANAGED': '${RUN_JAVA_PROGRAM_MANAGED}',
         'MAVEN_GROUP_ID': extract_macro_calls(unit, 'MAVEN_GROUP_ID_VALUE', args_delim),
         'JAR_INCLUDE_FILTER': extract_macro_calls(unit, 'JAR_INCLUDE_FILTER_VALUE', args_delim),
         'JAR_EXCLUDE_FILTER': extract_macro_calls(unit, 'JAR_EXCLUDE_FILTER_VALUE', args_delim),
@@ -219,151 +219,151 @@ def onjava_module(unit, *args):
     dart = 'JAVA_DART: ' + base64.b64encode(json.dumps(data)) + '\n' + DELIM + '\n'
 
     unit.set_property(['JAVA_DART_DATA', dart])
-    if not idea_only and unit.get('MODULE_TYPE') in ('JAVA_PROGRAM', 'JAVA_LIBRARY', 'JTEST', 'TESTNG', 'JUNIT5') and not unit.path().startswith('$S/contrib/java'): 
-        unit.on_add_classpath_clash_check() 
+    if not idea_only and unit.get('MODULE_TYPE') in ('JAVA_PROGRAM', 'JAVA_LIBRARY', 'JTEST', 'TESTNG', 'JUNIT5') and not unit.path().startswith('$S/contrib/java'):
+        unit.on_add_classpath_clash_check()
         if unit.get('LINT_LEVEL_VALUE') != "none":
             unit.onadd_check(['JAVA_STYLE', unit.get('LINT_LEVEL_VALUE')])
- 
- 
-def on_add_java_style_checks(unit, *args): 
-    if unit.get('LINT_LEVEL_VALUE') != "none": 
-        unit.onadd_check(['JAVA_STYLE', unit.get('LINT_LEVEL_VALUE')] + list(args)) 
- 
- 
-def on_add_classpath_clash_check(unit, *args): 
-    jdeps_val = (unit.get('CHECK_JAVA_DEPS_VALUE') or '').lower() 
-    if jdeps_val and jdeps_val not in ('yes', 'no', 'strict'): 
-        ymake.report_configure_error('CHECK_JAVA_DEPS: "yes", "no" or "strict" required') 
-    if jdeps_val and jdeps_val != 'no': 
-        unit.onjava_test_deps(jdeps_val) 
- 
- 
-# Ymake java modules related macroses 
- 
- 
-def onexternal_jar(unit, *args): 
-    args = list(args) 
-    flat, kv = common.sort_by_keywords({'SOURCES': 1}, args) 
-    if not flat: 
-        ymake.report_configure_error('EXTERNAL_JAR requires exactly one resource URL of compiled jar library') 
-    res = flat[0] 
-    resid = res[4:] if res.startswith('sbr:') else res 
-    unit.set(['JAR_LIB_RESOURCE', resid]) 
-    unit.set(['JAR_LIB_RESOURCE_URL', res]) 
- 
- 
-def on_check_java_srcdir(unit, *args): 
-    args = list(args) 
-    for arg in args: 
-        if not '$' in arg: 
-            arc_srcdir = os.path.join(unit.get('MODDIR'), arg) 
-            abs_srcdir = unit.resolve(os.path.join("$S/", arc_srcdir)) 
-            if not os.path.exists(abs_srcdir) or not os.path.isdir(abs_srcdir): 
-                ymake.report_configure_error( 
-                    'Trying to set a [[alt1]]JAVA_SRCS[[rst]] for a missing directory: [[imp]]$S/{}[[rst]]', 
-                    missing_dir=arc_srcdir 
-                ) 
-            return 
-        srcdir = unit.resolve_arc_path(arg) 
-        if srcdir and not srcdir.startswith('$S'): 
-            continue 
-        abs_srcdir = unit.resolve(srcdir) if srcdir else unit.resolve(arg) 
-        if not os.path.exists(abs_srcdir) or not os.path.isdir(abs_srcdir): 
-            ymake.report_configure_error( 
-                'Trying to set a [[alt1]]JAVA_SRCS[[rst]] for a missing directory: [[imp]]{}[[rst]]', 
-                missing_dir=srcdir 
-            ) 
- 
- 
-def on_fill_jar_copy_resources_cmd(unit, *args): 
-    if len(args) == 4: 
-        varname, srcdir, base_classes_dir, reslist = tuple(args) 
-        package = '' 
-    else: 
-        varname, srcdir, base_classes_dir, package, reslist = tuple(args) 
-    dest_dir = os.path.join(base_classes_dir, *package.split('.')) if package else base_classes_dir 
-    var = unit.get(varname) 
-    var += ' && $FS_TOOLS copy_files {} {} {}'.format(srcdir if srcdir.startswith('"$') else '${CURDIR}/' + srcdir, dest_dir, reslist) 
-    unit.set([varname, var]) 
- 
-def on_fill_jar_gen_srcs(unit, *args): 
-    varname, jar_type, srcdir, base_classes_dir, java_list, kt_list, groovy_list, res_list = tuple(args[0:8]) 
-    resolved_srcdir = unit.resolve_arc_path(srcdir) 
-    if not resolved_srcdir.startswith('$') or resolved_srcdir.startswith('$S'): 
-        return 
- 
-    exclude_pos = args.index('EXCLUDE') 
-    globs = args[7:exclude_pos] 
-    excludes = args[exclude_pos + 1:] 
-    var = unit.get(varname) 
-    var += ' && ${{cwd:BINDIR}} $YMAKE_PYTHON ${{input:"build/scripts/resolve_java_srcs.py"}} --append -d {} -s {} -k {} -g {} -r {} --include-patterns {}'.format(srcdir, java_list, kt_list, groovy_list, res_list, ' '.join(globs)) 
-    if jar_type == 'SRC_JAR': 
-        var += ' --all-resources' 
-    if len(excludes) > 0: 
-        var += ' --exclude-patterns {}'.format(' '.join(excludes)) 
-    if unit.get('WITH_KOTLIN_VALUE') == 'yes': 
-        var += ' --resolve-kotlin' 
-    unit.set([varname, var]) 
- 
- 
-def on_check_run_java_prog_classpath(unit, *args): 
-    if len(args) != 1: 
-        ymake.report_configure_error('multiple CLASSPATH elements in RUN_JAVA_PROGRAM invocation no more supported. Use JAVA_RUNTIME_PEERDIR on the JAVA_PROGRAM module instead') 
- 
- 
-def extract_words(words, keys): 
-    kv = {} 
-    k = None 
- 
-    for w in words: 
-        if w in keys: 
-            k = w 
-        else: 
-            if not k in kv: 
-                kv[k] = [] 
-            kv[k].append(w) 
- 
-    return kv 
- 
- 
-def parse_words(words): 
-    kv = extract_words(words, {'OUT', 'TEMPLATE'}) 
-    ws = [] 
-    for item in ('OUT', 'TEMPLATE'): 
-        for i, word in list(enumerate(kv[item])): 
-            if word == 'CUSTOM_PROPERTY': 
-                ws += kv[item][i:] 
-                kv[item] = kv[item][:i] 
-    tepmlates = kv['TEMPLATE'] 
-    outputs = kv['OUT'] 
-    if len(outputs) < len(tepmlates): 
-        ymake.report_configure_error('To many arguments for TEMPLATE parameter') 
-        return 
-    if ws and ws[0] != 'CUSTOM_PROPERTY': 
-        ymake.report_configure_error('''Can't parse {}'''.format(ws)) 
-    custom_props = [] 
-    for item in ws: 
-        if item == 'CUSTOM_PROPERTY': 
-            custom_props.append([]) 
-        else: 
-            custom_props[-1].append(item) 
-    props = [] 
-    for p in custom_props: 
-        if not p: 
-            ymake.report_configure_error('Empty CUSTOM_PROPERTY') 
-            continue 
-        props.append('-B') 
-        if len(p) > 1: 
-            props.append(base64.b64encode("{}={}".format(p[0], ' '.join(p[1:])))) 
-        else: 
-            ymake.report_configure_error('CUSTOM_PROPERTY "{}" value is not specified'.format(p[0])) 
-    for i, o in enumerate(outputs): 
-        yield o, tepmlates[min(i, len(tepmlates) - 1)], props 
- 
- 
-def on_ymake_generate_script(unit, *args): 
-    for out, tmpl, props in parse_words(list(args)): 
-        unit.on_add_gen_java_script([out, tmpl] + list(props)) 
+
+
+def on_add_java_style_checks(unit, *args):
+    if unit.get('LINT_LEVEL_VALUE') != "none":
+        unit.onadd_check(['JAVA_STYLE', unit.get('LINT_LEVEL_VALUE')] + list(args))
+
+
+def on_add_classpath_clash_check(unit, *args):
+    jdeps_val = (unit.get('CHECK_JAVA_DEPS_VALUE') or '').lower()
+    if jdeps_val and jdeps_val not in ('yes', 'no', 'strict'):
+        ymake.report_configure_error('CHECK_JAVA_DEPS: "yes", "no" or "strict" required')
+    if jdeps_val and jdeps_val != 'no':
+        unit.onjava_test_deps(jdeps_val)
+
+
+# Ymake java modules related macroses
+
+
+def onexternal_jar(unit, *args):
+    args = list(args)
+    flat, kv = common.sort_by_keywords({'SOURCES': 1}, args)
+    if not flat:
+        ymake.report_configure_error('EXTERNAL_JAR requires exactly one resource URL of compiled jar library')
+    res = flat[0]
+    resid = res[4:] if res.startswith('sbr:') else res
+    unit.set(['JAR_LIB_RESOURCE', resid])
+    unit.set(['JAR_LIB_RESOURCE_URL', res])
+
+
+def on_check_java_srcdir(unit, *args):
+    args = list(args)
+    for arg in args:
+        if not '$' in arg:
+            arc_srcdir = os.path.join(unit.get('MODDIR'), arg)
+            abs_srcdir = unit.resolve(os.path.join("$S/", arc_srcdir))
+            if not os.path.exists(abs_srcdir) or not os.path.isdir(abs_srcdir):
+                ymake.report_configure_error(
+                    'Trying to set a [[alt1]]JAVA_SRCS[[rst]] for a missing directory: [[imp]]$S/{}[[rst]]',
+                    missing_dir=arc_srcdir
+                )
+            return
+        srcdir = unit.resolve_arc_path(arg)
+        if srcdir and not srcdir.startswith('$S'):
+            continue
+        abs_srcdir = unit.resolve(srcdir) if srcdir else unit.resolve(arg)
+        if not os.path.exists(abs_srcdir) or not os.path.isdir(abs_srcdir):
+            ymake.report_configure_error(
+                'Trying to set a [[alt1]]JAVA_SRCS[[rst]] for a missing directory: [[imp]]{}[[rst]]',
+                missing_dir=srcdir
+            )
+
+
+def on_fill_jar_copy_resources_cmd(unit, *args):
+    if len(args) == 4:
+        varname, srcdir, base_classes_dir, reslist = tuple(args)
+        package = ''
+    else:
+        varname, srcdir, base_classes_dir, package, reslist = tuple(args)
+    dest_dir = os.path.join(base_classes_dir, *package.split('.')) if package else base_classes_dir
+    var = unit.get(varname)
+    var += ' && $FS_TOOLS copy_files {} {} {}'.format(srcdir if srcdir.startswith('"$') else '${CURDIR}/' + srcdir, dest_dir, reslist)
+    unit.set([varname, var])
+
+def on_fill_jar_gen_srcs(unit, *args):
+    varname, jar_type, srcdir, base_classes_dir, java_list, kt_list, groovy_list, res_list = tuple(args[0:8])
+    resolved_srcdir = unit.resolve_arc_path(srcdir)
+    if not resolved_srcdir.startswith('$') or resolved_srcdir.startswith('$S'):
+        return
+
+    exclude_pos = args.index('EXCLUDE')
+    globs = args[7:exclude_pos]
+    excludes = args[exclude_pos + 1:]
+    var = unit.get(varname)
+    var += ' && ${{cwd:BINDIR}} $YMAKE_PYTHON ${{input:"build/scripts/resolve_java_srcs.py"}} --append -d {} -s {} -k {} -g {} -r {} --include-patterns {}'.format(srcdir, java_list, kt_list, groovy_list, res_list, ' '.join(globs))
+    if jar_type == 'SRC_JAR':
+        var += ' --all-resources'
+    if len(excludes) > 0:
+        var += ' --exclude-patterns {}'.format(' '.join(excludes))
+    if unit.get('WITH_KOTLIN_VALUE') == 'yes':
+        var += ' --resolve-kotlin'
+    unit.set([varname, var])
+
+
+def on_check_run_java_prog_classpath(unit, *args):
+    if len(args) != 1:
+        ymake.report_configure_error('multiple CLASSPATH elements in RUN_JAVA_PROGRAM invocation no more supported. Use JAVA_RUNTIME_PEERDIR on the JAVA_PROGRAM module instead')
+
+
+def extract_words(words, keys):
+    kv = {}
+    k = None
+
+    for w in words:
+        if w in keys:
+            k = w
+        else:
+            if not k in kv:
+                kv[k] = []
+            kv[k].append(w)
+
+    return kv
+
+
+def parse_words(words):
+    kv = extract_words(words, {'OUT', 'TEMPLATE'})
+    ws = []
+    for item in ('OUT', 'TEMPLATE'):
+        for i, word in list(enumerate(kv[item])):
+            if word == 'CUSTOM_PROPERTY':
+                ws += kv[item][i:]
+                kv[item] = kv[item][:i]
+    tepmlates = kv['TEMPLATE']
+    outputs = kv['OUT']
+    if len(outputs) < len(tepmlates):
+        ymake.report_configure_error('To many arguments for TEMPLATE parameter')
+        return
+    if ws and ws[0] != 'CUSTOM_PROPERTY':
+        ymake.report_configure_error('''Can't parse {}'''.format(ws))
+    custom_props = []
+    for item in ws:
+        if item == 'CUSTOM_PROPERTY':
+            custom_props.append([])
+        else:
+            custom_props[-1].append(item)
+    props = []
+    for p in custom_props:
+        if not p:
+            ymake.report_configure_error('Empty CUSTOM_PROPERTY')
+            continue
+        props.append('-B')
+        if len(p) > 1:
+            props.append(base64.b64encode("{}={}".format(p[0], ' '.join(p[1:]))))
+        else:
+            ymake.report_configure_error('CUSTOM_PROPERTY "{}" value is not specified'.format(p[0]))
+    for i, o in enumerate(outputs):
+        yield o, tepmlates[min(i, len(tepmlates) - 1)], props
+
+
+def on_ymake_generate_script(unit, *args):
+    for out, tmpl, props in parse_words(list(args)):
+        unit.on_add_gen_java_script([out, tmpl] + list(props))
 
 def on_jdk_version_macro_check(unit, *args):
     if len(args) != 1:

+ 11 - 11
build/plugins/res.py

@@ -28,12 +28,12 @@ def split(lst, limit):
         yield bucket
 
 
-def remove_prefix(text, prefix): 
-    if text.startswith(prefix): 
-        return text[len(prefix):] 
-    return text 
- 
- 
+def remove_prefix(text, prefix):
+    if text.startswith(prefix):
+        return text[len(prefix):]
+    return text
+
+
 def onfat_resource(unit, *args):
     unit.onpeerdir(['library/cpp/resource'])
 
@@ -56,7 +56,7 @@ def onresource_files(unit, *args):
 
     This macro expands into
     RESOURCE([DONT_PARSE] {path} resfs/file/{prefix}{path}
-        - resfs/src/resfs/file/{prefix}{remove_prefix(path, prefix_to_strip)}={rootrel_arc_src(path)} 
+        - resfs/src/resfs/file/{prefix}{remove_prefix(path, prefix_to_strip)}={rootrel_arc_src(path)}
     )
 
     resfs/src/{key} stores a source root (or build root) relative path of the
@@ -74,7 +74,7 @@ def onresource_files(unit, *args):
     @see: https://wiki.yandex-team.ru/devtools/commandsandvars/resourcefiles/
     """
     prefix = ''
-    prefix_to_strip = None 
+    prefix_to_strip = None
     dest = None
     res = []
     first = 0
@@ -92,11 +92,11 @@ def onresource_files(unit, *args):
             prefix, dest = next(args), None
         elif arg == 'DEST':
             dest, prefix = next(args), None
-        elif arg == 'STRIP': 
-            prefix_to_strip = next(args) 
+        elif arg == 'STRIP':
+            prefix_to_strip = next(args)
         else:
             path = arg
-            key = 'resfs/file/' + (dest or (prefix + (path if not prefix_to_strip else remove_prefix(path, prefix_to_strip)))) 
+            key = 'resfs/file/' + (dest or (prefix + (path if not prefix_to_strip else remove_prefix(path, prefix_to_strip))))
             src = 'resfs/src/{}={}'.format(key, rootrel_arc_src(path, unit))
             res += ['-', src, path, key]
 

+ 3 - 3
build/plugins/scarab_cant_clash.py

@@ -2,10 +2,10 @@ import _common as common
 
 
 def onacceleo(unit, *args):
-    if unit.get("YMAKE_JAVA_MODULES") == "yes": 
-        return 
+    if unit.get("YMAKE_JAVA_MODULES") == "yes":
+        return
     flat, kv = common.sort_by_keywords(
-        {'XSD': -1, 'MTL': -1, 'MTL_ROOT': 1, 'LANG': -1, 'OUT': -1, 'OUT_NOAUTO': -1, 'OUTPUT_INCLUDES': -1, 'DEBUG': 0}, 
+        {'XSD': -1, 'MTL': -1, 'MTL_ROOT': 1, 'LANG': -1, 'OUT': -1, 'OUT_NOAUTO': -1, 'OUTPUT_INCLUDES': -1, 'DEBUG': 0},
         args
     )
 

Some files were not shown because too many files changed in this diff