@@ -14,11 +14,11 @@ macro ACCELEO(XSD{input}[], MTL{input}[], MTL_ROOT="${MODDIR}", LANG{input}[], O
1414###
1515### Documentation: https://wiki.yandex-team.ru/yatool/java/
1616module JAVA_LIBRARY: JAR_LIBRARY {
17- .SEM=_BUILD_JAR_SEM
17+ .SEM=$ _BUILD_JAR_SEM
1818}
1919
2020module JAVA_TEST_LIBRARY: JAR_LIBRARY {
21- .SEM=_BUILD_JAR_SEM
21+ .SEM=$ _BUILD_JAR_SEM
2222
2323 SET(_SEM_JAR_TARGET jar_test)
2424 SET(MODULE_TYPE JAVA_TEST_LIBRARY)
@@ -61,7 +61,7 @@ module _JAR_PROGRAM_COMPILATION: JAR_LIBRARY {
6161multimodule JAVA_PROGRAM {
6262 module JAR_RUNNABLE: _JAR_RUNNABLE {
6363 .ALLOWED=JAVA_RUNTIME_PEERDIR JAVA_RUNTIME_EXCLUDE
64- .SEM=_SEM_IGNORED
64+ .SEM=$ _SEM_IGNORED
6565 # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle:
6666 # * A -> B -> C -> lib-v1.4
6767 # | |-> DM(lib-v1.1)
@@ -76,7 +76,7 @@ multimodule JAVA_PROGRAM {
7676 SET(MODULE_TYPE JAVA_PROGRAM)
7777 }
7878 module JAR_COMPILATION: _JAR_PROGRAM_COMPILATION {
79- .SEM=_BUILD_JAR_SEM
79+ .SEM=$ _BUILD_JAR_SEM
8080 SET(MODULE_TYPE JAVA_PROGRAM)
8181
8282 when ($EXPORT_GRADLE == "yes") {
@@ -107,15 +107,15 @@ _BUILD_JAVA_ANNOTATION_PROCESSOR_SEM=$_BUILD_JAR_SEM
107107multimodule JAVA_ANNOTATION_PROCESSOR {
108108 module JAR_RUNNABLE: _JAR_RUNNABLE {
109109 .ALLOWED=JAVA_RUNTIME_PEERDIR JAVA_RUNTIME_EXCLUDE
110- .SEM=_SEM_IGNORED
110+ .SEM=$ _SEM_IGNORED
111111 .IGNORED=RUN_JAVA_PROGRAM PROVIDES FEATURE_VERSION
112112 .ALIASES=JAVA_RUNTIME_PEERDIR=PEERDIR JAVA_RUNTIME_EXCLUDE=EXCLUDE
113113 .PEERDIRSELF=JAR_COMPILATION
114114
115115 SET(MODULE_TYPE JAVA_ANNOTATION_PROCESSOR)
116116 }
117117 module JAR_COMPILATION: _JAR_PROGRAM_COMPILATION {
118- .SEM=_BUILD_JAVA_ANNOTATION_PROCESSOR_SEM
118+ .SEM=$ _BUILD_JAVA_ANNOTATION_PROCESSOR_SEM
119119
120120 SET(MODULE_TYPE JAVA_ANNOTATION_PROCESSOR)
121121 }
@@ -126,15 +126,15 @@ multimodule JAVA_CONTRIB_ANNOTATION_PROCESSOR {
126126 module JAR_RUNNABLE: _JAR_RUNNABLE {
127127 .IGNORED=JAVA_SRCS RUN_JAR_PROGRAM RUN_JAVA_PROGRAM JAR_RESOURCE SRC_RESOURCE LOCAL_JAR
128128 .PEERDIRSELF=JAR_COMPILATION
129- .SEM=_RUN_JAVA_CONTRIB_ANNOTATION_PROCESSOR_SEM
129+ .SEM=$ _RUN_JAVA_CONTRIB_ANNOTATION_PROCESSOR_SEM
130130
131131 SET(MODULE_TYPE JAVA_ANNOTATION_PROCESSOR)
132132 ENABLE(DISABLE_SCRIPTGEN)
133133 }
134134 module JAR_COMPILATION: JAVA_CONTRIB {
135135 .ALIASES=JAVA_RUNTIME_PEERDIR=_NOOP_MACRO JAVA_RUNTIME_EXCLUDE=_NOOP_MACRO
136136 .FINAL_TARGET=no
137- .SEM=_BUILD_JAVA_ANNOTATION_PROCESSOR_SEM
137+ .SEM=$ _BUILD_JAVA_ANNOTATION_PROCESSOR_SEM
138138 }
139139}
140140
@@ -156,7 +156,7 @@ macro JUNIT_TESTS_JAR(Dir, Jar) {
156156 SET(UNITTEST_MOD $Dir/$Jar)
157157}
158158
159- _BUILD_JUNIT5_JAR_SEM=$_BUILD_JAR_SEM && junit5_test $_TEST_CWD_SEM $_TEST_ENV_SEM
159+ _BUILD_JUNIT5_JAR_SEM=$_BUILD_JAR_SEM && junit5_test && $_TEST_CWD_SEM && $_TEST_ENV_SEM
160160
161161multimodule JUNIT5 {
162162 # ATTENTION ya ide idea relies on this submodule name to find scope of `ya make` build before project generation
@@ -172,7 +172,7 @@ multimodule JUNIT5 {
172172 .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION PROVIDES FEATURE_VERSION
173173 .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE
174174 .PEERDIRSELF=JUNIT5_JAR_COMPILATION
175- .SEM=_SEM_IGNORED
175+ .SEM=$ _SEM_IGNORED
176176
177177 PEERDIR(devtools/jtest-annotations/junit5)
178178
@@ -184,7 +184,7 @@ multimodule JUNIT5 {
184184 .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO
185185 .FINAL_TARGET=no
186186 .DEFAULT_NAME_GENERATOR=FullPath
187- .SEM=_BUILD_JUNIT5_JAR_SEM
187+ .SEM=$ _BUILD_JUNIT5_JAR_SEM
188188 .IGNORED=JUNIT_TESTS_JAR
189189
190190 PEERDIR+=devtools/junit5-runner
@@ -216,7 +216,7 @@ multimodule JUNIT5 {
216216 }
217217}
218218
219- _BUILD_JUNIT4_JAR_SEM=$_BUILD_JAR_SEM && junit4_test $_TEST_CWD_SEM $_TEST_ENV_SEM
219+ _BUILD_JUNIT4_JAR_SEM=$_BUILD_JAR_SEM && junit4_test && $_TEST_CWD_SEM && $_TEST_ENV_SEM
220220
221221multimodule JTEST {
222222 # ATTENTION ya ide idea relies on this submodule name to find scope of `ya make` build before project generation
@@ -232,7 +232,7 @@ multimodule JTEST {
232232 .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION PROVIDES FEATURE_VERSION
233233 .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE
234234 .PEERDIRSELF=JTEST_JAR_COMPILATION
235- .SEM=_SEM_IGNORED
235+ .SEM=$ _SEM_IGNORED
236236
237237 SET(MODULE_TYPE JTEST)
238238 SET_APPEND(PEERDIR_TAGS JAR_TESTABLE JAVA_TEST_LIBRARY)
@@ -244,7 +244,7 @@ multimodule JTEST {
244244 .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO
245245 .FINAL_TARGET=no
246246 .DEFAULT_NAME_GENERATOR=FullPath
247- .SEM=_BUILD_JUNIT4_JAR_SEM
247+ .SEM=$ _BUILD_JUNIT4_JAR_SEM
248248 .IGNORED=JUNIT_TESTS_JAR
249249
250250 SET(_SEM_JAR_TARGET junit4)
@@ -291,7 +291,7 @@ multimodule JTEST_FOR {
291291 .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE
292292 .RESTRICTED=JUNIT_TESTS_JAR
293293 .PEERDIRSELF=JTEST_FOR_JAR_COMPILATION
294- .SEM=_SEM_IGNORED
294+ .SEM=$ _SEM_IGNORED
295295
296296 SET(MODULE_TYPE JTEST_FOR)
297297 SET_APPEND(PEERDIR_TAGS JAR_TESTABLE JAVA_TEST_LIBRARY)
@@ -303,7 +303,7 @@ multimodule JTEST_FOR {
303303 .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO
304304 .FINAL_TARGET=no
305305 .DEFAULT_NAME_GENERATOR=FullPath
306- .SEM=_BUILD_JUNIT4_JAR_SEM
306+ .SEM=$ _BUILD_JUNIT4_JAR_SEM
307307 .RESTRICTED=JUNIT_TESTS_JAR
308308
309309 SET(_SEM_JAR_TARGET junit4)
@@ -319,7 +319,7 @@ multimodule JAVA_CONTRIB_PROGRAM {
319319 module JAR_RUNNABLE: _JAR_RUNNABLE {
320320 .IGNORED=JAVA_SRCS RUN_JAR_PROGRAM RUN_JAVA_PROGRAM JAR_RESOURCE SRC_RESOURCE LOCAL_JAR
321321 .PEERDIRSELF=JAR_COMPILATION
322- .SEM=_SEM_IGNORED
322+ .SEM=$ _SEM_IGNORED
323323
324324 SET(MODULE_TYPE JAVA_PROGRAM)
325325 ENABLE(DISABLE_SCRIPTGEN)
@@ -328,7 +328,7 @@ multimodule JAVA_CONTRIB_PROGRAM {
328328 module JAR_COMPILATION: JAVA_CONTRIB {
329329 .ALIASES=JAVA_RUNTIME_PEERDIR=_NOOP_MACRO JAVA_RUNTIME_EXCLUDE=_NOOP_MACRO
330330 .FINAL_TARGET=no
331- .SEM=_BUILD_JAR_SEM
331+ .SEM=$ _BUILD_JAR_SEM
332332
333333 SET(MODULE_TYPE JAVA_PROGRAM)
334334 }
@@ -371,7 +371,7 @@ module EXTERNAL_JAVA_LIBRARY: _BASE_UNIT {
371371 .EXTS=.jsrc .java .jar .mf
372372 .NODE_TYPE=Bundle
373373 .CMD=$COMPILE_JAVA_MF
374- .SEM=_EXTERNAL_JAVA_LIBRARY_SEM
374+ .SEM=$ _EXTERNAL_JAVA_LIBRARY_SEM
375375 .STRUCT_CMD=yes
376376 .PEERDIR_POLICY=as_build_from
377377 .FINAL_TARGET=no
@@ -572,6 +572,7 @@ module _JAR_BASE: _BARE_UNIT {
572572 .NODE_TYPE=Bundle
573573 .CMD=$TOUCH_UNIT
574574 .STRUCT_CMD=yes
575+ .STRUCT_SEM=yes
575576 .PEERDIR_POLICY=as_build_from
576577 .FINAL_TARGET=no
577578 .ALIASES=SRCS=_SRCS_NO_GLOBAL
@@ -602,7 +603,7 @@ module _JAR_BASE: _BARE_UNIT {
602603
603604# tag:java-specific
604605module JAVA_CONTRIB_PROXY: _JAR_BASE {
605- .SEM=_SEM_IGNORED
606+ .SEM=$ _SEM_IGNORED
606607 .VERSION_PROXY=yes
607608
608609 _DONT_REQUIRE_LICENSE()
@@ -650,17 +651,17 @@ _JAVA_CONTRIB_SEM= \
650651 consumer-classpath $EXPORT_GRADLE_CLASSPATH \
651652 && consumer-jar ${MODDIR}/${REALPRJNAME}.jar \
652653 && consumer-type contrib \
653- $_JDK_SEM \
654- $_JAVAC_SEM \
655- $_JVM_ARGS_SEM \
656- $_KOTLINC_SEM \
654+ && $_JDK_SEM \
655+ && $_JAVAC_SEM \
656+ && $_JVM_ARGS_SEM \
657+ && $_KOTLINC_SEM \
657658 && $_SEM_IGNORED
658659
659660# tag:java-specific
660661module JAVA_CONTRIB: _JAR_BASE {
661662 .CMD=$FETCH_CONTRIB_JAR && $GEN_JAR_SBOM_COMPONENT
662663 .PEERDIR_POLICY=as_include
663- .SEM=_JAVA_CONTRIB_SEM
664+ .SEM=$ _JAVA_CONTRIB_SEM
664665 .FINAL_TARGET=yes
665666 .GLOBAL=MAVEN_EXPORT_COORDS
666667
@@ -1056,37 +1057,37 @@ _BUILD_JAR_SEM= \
10561057 && consumer-classpath $EXPORT_GRADLE_CLASSPATH \
10571058 && consumer-jar ${MODDIR}/${REALPRJNAME}.jar \
10581059 && consumer-type library \
1059- $_JDK_SEM \
1060- $_JAVAC_SEM \
1061- $_JVM_ARGS_SEM \
1062- $_KOTLINC_SEM \
1063- $_KOTLIN_SEM \
1064- $_KAPT_SEM \
1065- $_JAR_MAIN_SEM \
1066- $_GRADLE_EXPORT_PUBLISHING_SEM \
1067- $_ANN_PROCESSORS_SEM \
1068- $_USE_ANNOTATION_PROCESSOR_SEM \
1069- $_USE_ERROR_PRONE_SEM \
1070- $_ENABLE_PREVIEW_SEM \
1071- $_JAR_SOURCE_SET_SEM
1060+ && $_JDK_SEM \
1061+ && $_JAVAC_SEM \
1062+ && $_JVM_ARGS_SEM \
1063+ && $_KOTLINC_SEM \
1064+ && $_KOTLIN_SEM \
1065+ && $_KAPT_SEM \
1066+ && $_JAR_MAIN_SEM \
1067+ && $_GRADLE_EXPORT_PUBLISHING_SEM \
1068+ && $_ANN_PROCESSORS_SEM \
1069+ && $_USE_ANNOTATION_PROCESSOR_SEM \
1070+ && $_USE_ERROR_PRONE_SEM \
1071+ && $_ENABLE_PREVIEW_SEM \
1072+ && $_JAR_SOURCE_SET_SEM
10721073
10731074_BUILD_PROTO_JAR_SEM= \
10741075 ${hide:target} ${hide:AUTO_INPUT} \
10751076 jar_proto $MODDIR $REALPRJNAME \
1076- $_JAVA_PROTO_SEM \
1077+ && $_JAVA_PROTO_SEM \
10771078 && consumer-classpath $EXPORT_GRADLE_CLASSPATH \
10781079 && consumer-jar ${MODDIR}/${REALPRJNAME}.jar \
10791080 && consumer-type library \
1080- ${pre= && consumer-proto_namespace : PROTO_NAMESPACE} \
1081- $_JDK_SEM \
1082- $_JAVAC_SEM \
1083- $_JVM_ARGS_SEM \
1084- $_KOTLINC_SEM \
1085- $_ANN_PROCESSORS_SEM \
1086- $_USE_ANNOTATION_PROCESSOR_SEM \
1087- $_USE_ERROR_PRONE_SEM \
1088- $_ENABLE_PREVIEW_SEM \
1089- $_KOTLIN_SEM
1081+ && consumer-proto_namespace $ PROTO_NAMESPACE \
1082+ && $_JDK_SEM \
1083+ && $_JAVAC_SEM \
1084+ && $_JVM_ARGS_SEM \
1085+ && $_KOTLINC_SEM \
1086+ && $_ANN_PROCESSORS_SEM \
1087+ && $_USE_ANNOTATION_PROCESSOR_SEM \
1088+ && $_USE_ERROR_PRONE_SEM \
1089+ && $_ENABLE_PREVIEW_SEM \
1090+ && $_KOTLIN_SEM
10901091
10911092# tag:java-specific tag:internal
10921093### @usage: JAR_LIBRARY() #internal
@@ -1095,7 +1096,7 @@ _BUILD_PROTO_JAR_SEM= \
10951096module JAR_LIBRARY: _COMPILABLE_JAR_BASE {
10961097 .EXTS=.jsrc .java .jar .mf .gentar .kt
10971098 .CMD=$LINK_JAR
1098- .SEM=_BUILD_JAR_SEM
1099+ .SEM=$ _BUILD_JAR_SEM
10991100 .FINAL_TARGET=yes
11001101 .ALIASES=JAVA_SRCS=FULL_JAVA_SRCS ANNOTATION_PROCESSOR=JAR_ANNOTATION_PROCESSOR
11011102 .RESTRICTED=EXTERNAL_JAR
@@ -1327,7 +1328,7 @@ macro _MARK_JAVA_PROG_WITH_SOURCES(Args...) {
13271328module _JAR_RUNNABLE: _COMPILABLE_JAR_BASE {
13281329 .FINAL_TARGET=yes
13291330 .CMD=$LINK_JAR_PROGRAM
1330- .SEM=_SEM_IGNORED
1331+ .SEM=$ _SEM_IGNORED
13311332 .ALIASES=JAVA_SRCS=_MARK_JAVA_PROG_WITH_SOURCES
13321333 .ALLOWED=WITH_JDK GENERATE_SCRIPT
13331334 .PEERDIR_POLICY=as_build_from
@@ -2111,14 +2112,14 @@ DETEKT_VERSION=1.23.7
21112112
21122113_KOTLIN_SEM= \
21132114 ${_WITH_KOTLIN_SEM} \
2114- ${_KOTLIN_VERSION_SEM} \
2115- ${_WITH_KOTLIN_PROTO_SEM} \
2116- ${_WITH_KOTLIN_GRPC_SEM} \
2117- ${_WITH_KOTLINC_PLUGIN_ALLOPEN_SEM} \
2118- ${_WITH_KOTLINC_PLUGIN_LOMBOK_SEM} \
2119- ${_WITH_KOTLINC_PLUGIN_NOARG_SEM} \
2120- ${_WITH_KOTLINC_PLUGIN_SERIALIZATION_SEM} \
2121- ${_WITH_KOTLINC_PLUGIN_DETEKT_SEM}
2115+ && ${_KOTLIN_VERSION_SEM} \
2116+ && ${_WITH_KOTLIN_PROTO_SEM} \
2117+ && ${_WITH_KOTLIN_GRPC_SEM} \
2118+ && ${_WITH_KOTLINC_PLUGIN_ALLOPEN_SEM} \
2119+ && ${_WITH_KOTLINC_PLUGIN_LOMBOK_SEM} \
2120+ && ${_WITH_KOTLINC_PLUGIN_NOARG_SEM} \
2121+ && ${_WITH_KOTLINC_PLUGIN_SERIALIZATION_SEM} \
2122+ && ${_WITH_KOTLINC_PLUGIN_DETEKT_SEM}
21222123
21232124
21242125_JAVA_PROTO_GRPC_SEM=
@@ -2136,7 +2137,7 @@ _JAVA_PROTO_SEM= \
21362137 && proto_compiler_version ${JAVA_PROTO_COMPILER_VERSION} \
21372138 && proto_runtime_version ${JAVA_PROTO_RUNTIME_VERSION} \
21382139 && proto_common_version ${JAVA_PROTO_COMMON_VERSION} \
2139- ${_JAVA_PROTO_GRPC_SEM}
2140+ && ${_JAVA_PROTO_GRPC_SEM}
21402141
21412142# tag:java-specific
21422143DIRECT_DEPS_ONLY_VALUE=
@@ -2213,6 +2214,7 @@ module JSRC_LIBRARY: _BARE_UNIT {
22132214 .FINAL_TARGET=no
22142215 .PEERDIR_POLICY=as_include
22152216 .STRUCT_CMD=yes
2217+ .STRUCT_SEM=yes
22162218 PEERDIR_TAGS=JAVA JAVA_PROTO JAVA_PROTO_FROM_SCHEMA JAVA_FBS JAVA_IDL
22172219 MODULE_TYPE=LIBRARY
22182220 SET(MODULE_SUFFIX .jsrc)
@@ -2249,6 +2251,7 @@ otherwise {
22492251### Specify JDK version for module
22502252macro _JDK_VERSION_INTERNAL(Arg) {
22512253 .SEM=required_jdk $Arg ${hide;output:"JdkVersionFakeProp.java"}
2254+ .STRUCT_SEM=yes
22522255 SET(JDK_REAL_VERSION $Arg)
22532256 _JDK_VERSION_MACRO_CHECK($Arg)
22542257}
0 commit comments