aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-02-21 15:43:19 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-02-21 15:43:19 +0300
commit178d0e7645de04588522cd6287777cd7a2f065f9 (patch)
tree19adf240d2ef3b75bf3671aeeaa87eb15bfc0b21 /build
parentc161c2c45e7a70edd43d8fb8b4de942d62db5690 (diff)
downloadydb-178d0e7645de04588522cd6287777cd7a2f065f9.tar.gz
intermediate changes
ref:489c487087adbbffdc59e875df6227bdb2f0bc23
Diffstat (limited to 'build')
-rw-r--r--build/conf/project_specific/maps/mapkit.conf2
-rw-r--r--build/platform/java/jdk/jdk11/ya.make2
-rw-r--r--build/platform/java/jdk/jdk13/ya.make2
-rw-r--r--build/platform/java/jdk/ya.make38
-rw-r--r--build/platform/java/uberjar/ya.make18
-rw-r--r--build/plugins/java.py4
-rw-r--r--build/plugins/ytest.py6
-rw-r--r--build/ya.conf.json6
-rw-r--r--build/ymake.core.conf188
9 files changed, 155 insertions, 111 deletions
diff --git a/build/conf/project_specific/maps/mapkit.conf b/build/conf/project_specific/maps/mapkit.conf
index d64b41f72a..db64b3112c 100644
--- a/build/conf/project_specific/maps/mapkit.conf
+++ b/build/conf/project_specific/maps/mapkit.conf
@@ -191,7 +191,7 @@ when ($MAPSMOBI_BUILD_TARGET) {
CFLAGS+=-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DBOOST_CB_DISABLE_DEBUG -DBOOST_COROUTINES_NO_DEPRECATION_WARNING -DYANDEX_EXPORT=${YANDEX_EXPORT} -DYRT_EXPORT=${YRT_EXPORT}
}
when ($MAPSMOBI_BUILD_TARGET && $OS_ANDROID) {
- JDK_VERSION=8
+ JDK_REAL_VERSION=8
MAPSMOBI_CPP_PROTO_PLUGINS="dllexport_decl=YANDEX_EXPORT"
YANDEX_EXPORT=__attribute__((visibility(\"default\")))
CFLAGS+=-fvisibility=hidden
diff --git a/build/platform/java/jdk/jdk11/ya.make b/build/platform/java/jdk/jdk11/ya.make
index ae450c9c97..fcba316390 100644
--- a/build/platform/java/jdk/jdk11/ya.make
+++ b/build/platform/java/jdk/jdk11/ya.make
@@ -22,7 +22,7 @@ ENDIF()
IF(SANITIZER_TYPE == "address")
IF(HOST_OS_LINUX)
- DECLARE_EXTERNAL_RESOURCE(JDK_FOR_TESTS11 ${JDK11_LINUX_ASAN})
+ DECLARE_EXTERNAL_RESOURCE(JDK11_FOR_TESTS ${JDK11_LINUX_ASAN})
ELSE()
MESSAGE(FATAL_ERROR Unsupported platform for JDK11 with asan)
ENDIF()
diff --git a/build/platform/java/jdk/jdk13/ya.make b/build/platform/java/jdk/jdk13/ya.make
index 527af68fb2..508cb6c750 100644
--- a/build/platform/java/jdk/jdk13/ya.make
+++ b/build/platform/java/jdk/jdk13/ya.make
@@ -19,7 +19,7 @@ ENDIF()
IF(SANITIZER_TYPE == "address")
IF(HOST_OS_LINUX)
- DECLARE_EXTERNAL_RESOURCE(JDK_FOR_TESTS ${JDK13_LINUX_ASAN})
+ DECLARE_EXTERNAL_RESOURCE(JDK13_FOR_TESTS ${JDK13_LINUX_ASAN})
ELSE()
MESSAGE(FATAL_ERROR Unsupported platform for JDK13 with asan)
ENDIF()
diff --git a/build/platform/java/jdk/ya.make b/build/platform/java/jdk/ya.make
index 909ae36e18..2d9eb394fa 100644
--- a/build/platform/java/jdk/ya.make
+++ b/build/platform/java/jdk/ya.make
@@ -3,7 +3,7 @@ OWNER(heretic)
INCLUDE(resources.inc)
-IF(JDK_VERSION == "17")
+IF(JDK_REAL_VERSION == "17")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK_DEFAULT
${JDK17_DARWIN} FOR DARWIN
@@ -14,7 +14,7 @@ IF(JDK_VERSION == "17")
IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
MESSAGE(FATAL_ERROR Unsupported platform for JDK17)
ENDIF()
-ELSEIF(JDK_VERSION == "16")
+ELSEIF(JDK_REAL_VERSION == "16")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK_DEFAULT
${JDK16_DARWIN} FOR DARWIN
@@ -25,7 +25,7 @@ ELSEIF(JDK_VERSION == "16")
IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
MESSAGE(FATAL_ERROR Unsupported platform for JDK16)
ENDIF()
-ELSEIF(JDK_VERSION == "15")
+ELSEIF(JDK_REAL_VERSION == "15")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK_DEFAULT
${JDK15_DARWIN} FOR DARWIN
@@ -36,7 +36,7 @@ ELSEIF(JDK_VERSION == "15")
IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
MESSAGE(FATAL_ERROR Unsupported platform for JDK15)
ENDIF()
-ELSEIF(JDK_VERSION == "14")
+ELSEIF(JDK_REAL_VERSION == "14")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK_DEFAULT
${JDK14_DARWIN} FOR DARWIN
@@ -46,7 +46,7 @@ ELSEIF(JDK_VERSION == "14")
IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
MESSAGE(FATAL_ERROR Unsupported platform for JDK14)
ENDIF()
-ELSEIF(JDK_VERSION == "13")
+ELSEIF(JDK_REAL_VERSION == "13")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK_DEFAULT
${JDK13_DARWIN} FOR DARWIN
@@ -56,7 +56,7 @@ ELSEIF(JDK_VERSION == "13")
IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
MESSAGE(FATAL_ERROR Unsupported platform for JDK13)
ENDIF()
-ELSEIF(JDK_VERSION == "12")
+ELSEIF(JDK_REAL_VERSION == "12")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK_DEFAULT
${JDK12_DARWIN} FOR DARWIN
@@ -66,7 +66,7 @@ ELSEIF(JDK_VERSION == "12")
IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
MESSAGE(FATAL_ERROR Unsupported platform for JDK12)
ENDIF()
-ELSEIF(JDK_VERSION == "11")
+ELSEIF(JDK_REAL_VERSION == "11")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK_DEFAULT
${JDK11_DARWIN} FOR DARWIN
@@ -77,14 +77,14 @@ ELSEIF(JDK_VERSION == "11")
IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
MESSAGE(FATAL_ERROR Unsupported platform for JDK11)
ENDIF()
-ELSEIF(JDK_VERSION == "10")
+ELSEIF(JDK_REAL_VERSION == "10")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK_DEFAULT
${JDK10_DARWIN} FOR DARWIN
${JDK10_LINUX} FOR LINUX
${JDK10_WINDOWS} FOR WIN32
)
-ELSEIF(JDK_VERSION == "8")
+ELSEIF(JDK_REAL_VERSION == "8")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK_DEFAULT
${JDK8_DARWIN_ARM64} FOR DARWIN-ARM64
@@ -96,12 +96,12 @@ ELSEIF(JDK_VERSION == "8")
MESSAGE(FATAL_ERROR Unsupported platform for JDK8)
ENDIF()
ELSE()
- MESSAGE(FATAL_ERROR Unsupported JDK version)
+ MESSAGE(FATAL_ERROR Unsupported JDK version ${JDK_REAL_VERSION})
ENDIF()
IF(USE_SYSTEM_JDK)
MESSAGE(WARNING System JDK $USE_SYSTEM_JDK will be used)
-ELSEIF(JDK_VERSION == "17")
+ELSEIF(JDK_REAL_VERSION == "17")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK
${JDK17_DARWIN} FOR DARWIN
@@ -122,7 +122,7 @@ ELSEIF(JDK_VERSION == "17")
ELSEIF(OS_WINDOWS)
DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK17_WINDOWS})
ENDIF()
-ELSEIF(JDK_VERSION == "16")
+ELSEIF(JDK_REAL_VERSION == "16")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK
${JDK16_DARWIN} FOR DARWIN
@@ -143,7 +143,7 @@ ELSEIF(JDK_VERSION == "16")
ELSEIF(OS_WINDOWS)
DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK16_WINDOWS})
ENDIF()
-ELSEIF(JDK_VERSION == "15")
+ELSEIF(JDK_REAL_VERSION == "15")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK
${JDK15_DARWIN} FOR DARWIN
@@ -164,7 +164,7 @@ ELSEIF(JDK_VERSION == "15")
ELSEIF(OS_WINDOWS)
DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK15_WINDOWS})
ENDIF()
-ELSEIF(JDK_VERSION == "14")
+ELSEIF(JDK_REAL_VERSION == "14")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK
${JDK14_DARWIN} FOR DARWIN
@@ -182,7 +182,7 @@ ELSEIF(JDK_VERSION == "14")
ELSEIF(OS_WINDOWS)
DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK14_WINDOWS})
ENDIF()
-ELSEIF(JDK_VERSION == "13")
+ELSEIF(JDK_REAL_VERSION == "13")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK
${JDK13_DARWIN} FOR DARWIN
@@ -207,7 +207,7 @@ ELSEIF(JDK_VERSION == "13")
ELSEIF(OS_WINDOWS)
DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK13_WINDOWS})
ENDIF()
-ELSEIF(JDK_VERSION == "12")
+ELSEIF(JDK_REAL_VERSION == "12")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK
${JDK12_DARWIN} FOR DARWIN
@@ -225,7 +225,7 @@ ELSEIF(JDK_VERSION == "12")
ELSEIF(OS_WINDOWS)
DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK12_WINDOWS})
ENDIF()
-ELSEIF(JDK_VERSION == "11")
+ELSEIF(JDK_REAL_VERSION == "11")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK
${JDK11_DARWIN} FOR DARWIN
@@ -253,7 +253,7 @@ ELSEIF(JDK_VERSION == "11")
ELSEIF(OS_WINDOWS)
DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK11_WINDOWS})
ENDIF()
-ELSEIF(JDK_VERSION == "10")
+ELSEIF(JDK_REAL_VERSION == "10")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK
${JDK10_DARWIN} FOR DARWIN
@@ -271,7 +271,7 @@ ELSEIF(JDK_VERSION == "10")
ELSEIF(OS_WINDOWS)
DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK10_WINDOWS})
ENDIF()
-ELSEIF(JDK_VERSION == "8")
+ELSEIF(JDK_REAL_VERSION == "8")
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
JDK
${JDK8_DARWIN_ARM64} FOR DARWIN-ARM64
diff --git a/build/platform/java/uberjar/ya.make b/build/platform/java/uberjar/ya.make
index 29c934d5b1..a4214abccf 100644
--- a/build/platform/java/uberjar/ya.make
+++ b/build/platform/java/uberjar/ya.make
@@ -3,23 +3,23 @@ OWNER(heretic)
IF(USE_SYSTEM_UBERJAR)
MESSAGE(WARNING System uberjar $USE_SYSTEM_UBERJAR will be used)
-ELSEIF(JDK_VERSION == "17")
+ELSEIF(JDK_REAL_VERSION == "17")
DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:2199772343)
-ELSEIF(JDK_VERSION == "16")
+ELSEIF(JDK_REAL_VERSION == "16")
DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:2199772343)
-ELSEIF(JDK_VERSION == "15")
+ELSEIF(JDK_REAL_VERSION == "15")
DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:2074702997)
-ELSEIF(JDK_VERSION == "14")
+ELSEIF(JDK_REAL_VERSION == "14")
DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:1407329657)
-ELSEIF(JDK_VERSION == "13")
+ELSEIF(JDK_REAL_VERSION == "13")
DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:1165818979)
-ELSEIF(JDK_VERSION == "12")
+ELSEIF(JDK_REAL_VERSION == "12")
DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:962498940)
-ELSEIF(JDK_VERSION == "11")
+ELSEIF(JDK_REAL_VERSION == "11")
DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:962498940)
-ELSEIF(JDK_VERSION == "10" OR JDK10) # !JDK10 flag is deprecated, this check should be removed later
+ELSEIF(JDK_REAL_VERSION == "10" OR JDK10) # !JDK10 flag is deprecated, this check should be removed later
DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:720309903)
-ELSEIF(JDK_VERSION == "8")
+ELSEIF(JDK_REAL_VERSION == "8")
DECLARE_EXTERNAL_RESOURCE(UBERJAR sbr:962511340)
ELSE()
MESSAGE(FATAL_ERROR Uberjar is not supported for selected JDK version)
diff --git a/build/plugins/java.py b/build/plugins/java.py
index 16fc126734..5bff16027f 100644
--- a/build/plugins/java.py
+++ b/build/plugins/java.py
@@ -124,9 +124,9 @@ def onjava_module(unit, *args):
'FAKEID': extract_macro_calls(unit, 'FAKEID', args_delim),
'TEST_DATA': extract_macro_calls(unit, 'TEST_DATA_VALUE', args_delim),
'JAVA_FORBIDDEN_LIBRARIES': extract_macro_calls(unit, 'JAVA_FORBIDDEN_LIBRARIES_VALUE', args_delim),
- 'JDK_RESOURCE': 'JDK' + (unit.get('JDK_VERSION') or '_DEFAULT')
+ 'JDK_RESOURCE': 'JDK' + (unit.get('JDK_VERSION') or unit.get('JDK_REAL_VERSION') or '_DEFAULT')
}
- if unit.get('ENABLE_PREVIEW_VALUE') == 'yes' and unit.get('JDK_VERSION') in ('15', '16', '17'):
+ if unit.get('ENABLE_PREVIEW_VALUE') == 'yes' and (unit.get('JDK_VERSION') or unit.get('JDK_REAL_VERSION')) in ('15', '16', '17'):
data['ENABLE_PREVIEW'] = extract_macro_calls(unit, 'ENABLE_PREVIEW_VALUE', args_delim)
if unit.get('SAVE_JAVAC_GENERATED_SRCS_DIR') and unit.get('SAVE_JAVAC_GENERATED_SRCS_TAR'):
diff --git a/build/plugins/ytest.py b/build/plugins/ytest.py
index 149c0a3ace..73be62fb6b 100644
--- a/build/plugins/ytest.py
+++ b/build/plugins/ytest.py
@@ -579,7 +579,7 @@ def onadd_check(unit, *args):
fork_mode = unit.get('TEST_FORK_MODE') or ''
if ymake_java_test:
extra_test_data = java_srcdirs_to_data(unit, 'ALL_SRCDIRS')
- extra_test_dart_data['JDK_RESOURCE'] = 'JDK' + (unit.get('JDK_VERSION') or '_DEFAULT')
+ extra_test_dart_data['JDK_RESOURCE'] = 'JDK' + (unit.get('JDK_VERSION') or unit.get('JDK_REAL_VERSION') or '_DEFAULT')
elif check_type == "gofmt":
script_rel_path = check_type
go_files = flat_args[1:]
@@ -859,8 +859,8 @@ def onjava_test(unit, *args):
'SKIP_TEST': unit.get('SKIP_TEST_VALUE') or '',
'JAVA_CLASSPATH_CMD_TYPE': java_cp_arg_type,
'NO_JBUILD': 'yes' if ymake_java_test else 'no',
- 'JDK_RESOURCE': 'JDK' + (unit.get('JDK_VERSION') or '_DEFAULT'),
- 'JDK_FOR_TESTS': 'JDK' + (unit.get('JDK_VERSION') or '_DEFAULT') + '_FOR_TESTS',
+ 'JDK_RESOURCE': 'JDK' + (unit.get('JDK_VERSION') or unit.get('JDK_REAL_VERSION') or '_DEFAULT'),
+ 'JDK_FOR_TESTS': 'JDK' + (unit.get('JDK_VERSION') or unit.get('JDK_REAL_VERSION') or '_DEFAULT') + '_FOR_TESTS',
}
test_classpath_origins = unit.get('TEST_CLASSPATH_VALUE')
if test_classpath_origins:
diff --git a/build/ya.conf.json b/build/ya.conf.json
index eb6979823a..1a19c23eeb 100644
--- a/build/ya.conf.json
+++ b/build/ya.conf.json
@@ -5740,7 +5740,9 @@
},
"ymake": {
"formula": {
- "sandbox_id": [1220934101],
+ "sandbox_id": [
+ 1220934101
+ ],
"match": "ymake"
},
"executable": {
@@ -7874,7 +7876,7 @@
},
"iceflame": {
"formula": {
- "sandbox_id": 1179554942,
+ "sandbox_id": 1222412675,
"match": "iceflame"
},
"executable": {
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 1d86c4ca62..621858ab45 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -3439,7 +3439,7 @@ module EXTERNAL_JAVA_LIBRARY: _BASE_UNIT {
.RESTRICTED=EXTERNAL_JAR
PEERDIR(build/platform/java/jdk)
- PEERDIR+=$JDK_RESOURCE_PEERDIR
+ PEERDIR+=$JDK_RESOURCE_PEERDIR $EXTERNAL_JAVA_EXTRA_PEERDIR
PEERDIR_TAGS=JAVA_PROTO JAVA_FBS JAVA_IDL
PROPAGATES_MANAGEABLE_PEERS=yes
@@ -3847,12 +3847,12 @@ module JAR_LIBRARY: _COMPILABLE_JAR_BASE {
JAVAC_CMD=$ERROR_PRONE_JAVAC_CMD
}
- when($ERROR_PRONE_VALUE && $JDK_VERSION == "16") {
+ when($ERROR_PRONE_VALUE && $JDK_REAL_VERSION == "16") {
JAVAC_FLAGS_VALUE+=$ERROR_PRONE_JDK16_ADD_OPENS
JAVAC_OPTS+=$ERROR_PRONE_JDK16_ADD_OPENS
}
- when($ERROR_PRONE_VALUE && $JDK_VERSION == "17") {
+ when($ERROR_PRONE_VALUE && $JDK_REAL_VERSION == "17") {
JAVAC_FLAGS_VALUE+=$ERROR_PRONE_JDK16_ADD_OPENS
JAVAC_OPTS+=$ERROR_PRONE_JDK16_ADD_OPENS
}
@@ -4246,68 +4246,101 @@ module PY3_PROGRAM_BIN: _BASE_PY3_PROGRAM {
JAVA_SWIG_DELIM=JAVA_SWIG_DELIM
# tag:java-specific
-JDK_VERSION=11
-when ($MAPSMOBI_BUILD_TARGET && $OS_ANDROID) {
- JDK_VERSION=8
+JDK_REAL_VERSION=
+JDK_VERSION=
+
+when ($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 == "14") {
+ JDK_REAL_VERSION=14
+}
+elsewhen ($JDK_VERSION == "13") {
+ JDK_REAL_VERSION=13
+}
+elsewhen ($JDK_VERSION == "12") {
+ JDK_REAL_VERSION=12
+}
+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=8
+}
+otherwise {
+ JDK_REAL_VERSION=17
}
# tag:java-specific
# remove extra peerdir to jdk11 after https://st.yandex-team.ru/DEVTOOLS-8851 is done
-when ($JDK_VERSION == "17") {
- JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk17 build/platform/java/jdk/jdk11
+when ($JDK_REAL_VERSION == "17") {
+ JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk17
}
-when ($JDK_VERSION == "16") {
- JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk16 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_VERSION == "15") {
- JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk15 build/platform/java/jdk/jdk11
+when ($JDK_REAL_VERSION == "15") {
+ JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk15 build/platform/java/jdk/jdk17
}
-when ($JDK_VERSION == "14") {
- JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk14 build/platform/java/jdk/jdk11
+when ($JDK_REAL_VERSION == "14") {
+ JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk14 build/platform/java/jdk/jdk17
}
-when ($JDK_VERSION == "13") {
- JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk13 build/platform/java/jdk/jdk11
+when ($JDK_REAL_VERSION == "13") {
+ JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk13 build/platform/java/jdk/jdk17
}
-when ($JDK_VERSION == "12") {
- JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk12 build/platform/java/jdk/jdk11
+when ($JDK_REAL_VERSION == "12") {
+ JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk12 build/platform/java/jdk/jdk17
}
-when ($JDK_VERSION == "11") {
- JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk11
+when ($JDK_REAL_VERSION == "11") {
+ JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk11 build/platform/java/jdk/jdk17
}
-when ($JDK_VERSION == "10") {
- JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk10 build/platform/java/jdk/jdk11
+when ($JDK_REAL_VERSION == "10") {
+ JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk10 build/platform/java/jdk/jdk17
}
-when ($JDK_VERSION == "8") {
- JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk8 build/platform/java/jdk/jdk11
+when ($JDK_REAL_VERSION == "8") {
+
+ JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk8 build/platform/java/jdk/jdk17
}
# tag:java-specific
-when ($JDK_VERSION == "17") {
+when ($JDK_REAL_VERSION == "17") {
UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar17
}
-when ($JDK_VERSION == "16") {
+when ($JDK_REAL_VERSION == "16") {
UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar16
}
-when ($JDK_VERSION == "15") {
+when ($JDK_REAL_VERSION == "15") {
UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar15
}
-when ($JDK_VERSION == "14") {
+when ($JDK_REAL_VERSION == "14") {
UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar14
}
-when ($JDK_VERSION == "13") {
+when ($JDK_REAL_VERSION == "13") {
UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar13
}
-when ($JDK_VERSION == "12") {
+when ($JDK_REAL_VERSION == "12") {
UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar12
}
-when ($JDK_VERSION == "11") {
+when ($JDK_REAL_VERSION == "11") {
UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar11
}
-when ($JDK_VERSION == "10") {
+when ($JDK_REAL_VERSION == "10") {
UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar10
}
-when ($JDK_VERSION == "8") {
+when ($JDK_REAL_VERSION == "8") {
UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar8
}
@@ -4317,48 +4350,48 @@ when ($USE_SYSTEM_JDK) {
JDK_RESOURCE=$USE_SYSTEM_JDK
}
otherwise {
- when ($JDK_VERSION == "17") {
+ when ($JDK_REAL_VERSION == "17") {
JDK_RESOURCE=$JDK17_RESOURCE_GLOBAL
}
- when ($JDK_VERSION == "16") {
+ when ($JDK_REAL_VERSION == "16") {
JDK_RESOURCE=$JDK16_RESOURCE_GLOBAL
}
- when ($JDK_VERSION == "15") {
+ when ($JDK_REAL_VERSION == "15") {
JDK_RESOURCE=$JDK15_RESOURCE_GLOBAL
}
- when ($JDK_VERSION == "14") {
+ when ($JDK_REAL_VERSION == "14") {
JDK_RESOURCE=$JDK14_RESOURCE_GLOBAL
}
- when ($JDK_VERSION == "13") {
+ when ($JDK_REAL_VERSION == "13") {
JDK_RESOURCE=$JDK13_RESOURCE_GLOBAL
}
- when ($JDK_VERSION == "12") {
+ when ($JDK_REAL_VERSION == "12") {
JDK_RESOURCE=$JDK12_RESOURCE_GLOBAL
}
- when ($JDK_VERSION == "11") {
+ when ($JDK_REAL_VERSION == "11") {
JDK_RESOURCE=$JDK11_RESOURCE_GLOBAL
}
- when ($JDK_VERSION == "10") {
+ when ($JDK_REAL_VERSION == "10") {
JDK_RESOURCE=$JDK10_RESOURCE_GLOBAL
}
- when ($JDK_VERSION == "8") {
+ when ($JDK_REAL_VERSION == "8") {
JDK_RESOURCE=$JDK8_RESOURCE_GLOBAL
}
}
# tag:java-specific
when (!$USE_SYSTEM_ERROR_PRONE) {
- when ($JDK_VERSION == "8" || $JDK_VERSION == "10") {
+ 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_VERSION == "11" || $JDK_VERSION == "12" || $JDK_VERSION == "13" || $JDK_VERSION == "14" || $JDK_VERSION == "15" || $JDK_VERSION == "16") {
+ elsewhen ($JDK_REAL_VERSION == "11" || $JDK_REAL_VERSION == "12" || $JDK_REAL_VERSION == "13" || $JDK_REAL_VERSION == "14" || $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_VERSION == "17") {
+ 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
@@ -4380,66 +4413,75 @@ when ($USE_SYSTEM_UBERJAR) {
UBERJAR_RESOURCE=$USE_SYSTEM_UBERJAR
}
otherwise {
- when ($JDK_VERSION == "17") {
+ when ($JDK_REAL_VERSION == "17") {
UBERJAR_RESOURCE=$UBERJAR17_RESOURCE_GLOBAL
}
- when ($JDK_VERSION == "16") {
+ when ($JDK_REAL_VERSION == "16") {
UBERJAR_RESOURCE=$UBERJAR16_RESOURCE_GLOBAL
}
- when ($JDK_VERSION == "15") {
+ when ($JDK_REAL_VERSION == "15") {
UBERJAR_RESOURCE=$UBERJAR15_RESOURCE_GLOBAL
}
- when ($JDK_VERSION == "14") {
+ when ($JDK_REAL_VERSION == "14") {
UBERJAR_RESOURCE=$UBERJAR14_RESOURCE_GLOBAL
}
- when ($JDK_VERSION == "13") {
+ when ($JDK_REAL_VERSION == "13") {
UBERJAR_RESOURCE=$UBERJAR13_RESOURCE_GLOBAL
}
- when ($JDK_VERSION == "12") {
+ when ($JDK_REAL_VERSION == "12") {
UBERJAR_RESOURCE=$UBERJAR12_RESOURCE_GLOBAL
}
- when ($JDK_VERSION == "11") {
+ when ($JDK_REAL_VERSION == "11") {
UBERJAR_RESOURCE=$UBERJAR11_RESOURCE_GLOBAL
}
- when ($JDK_VERSION == "10") {
+ when ($JDK_REAL_VERSION == "10") {
UBERJAR_RESOURCE=$UBERJAR10_RESOURCE_GLOBAL
}
- when ($JDK_VERSION == "8") {
+ when ($JDK_REAL_VERSION == "8") {
UBERJAR_RESOURCE=$UBERJAR8_RESOURCE_GLOBAL
}
}
# tag:java-specific
-when ($JDK_VERSION == "17") {
+when ($JDK_REAL_VERSION == "17") {
WITH_JDK_RESOURCE=$WITH_JDK17_RESOURCE_GLOBAL
}
-when ($JDK_VERSION == "16") {
+when ($JDK_REAL_VERSION == "16") {
WITH_JDK_RESOURCE=$WITH_JDK16_RESOURCE_GLOBAL
}
-when ($JDK_VERSION == "15") {
+when ($JDK_REAL_VERSION == "15") {
WITH_JDK_RESOURCE=$WITH_JDK15_RESOURCE_GLOBAL
}
-when ($JDK_VERSION == "14") {
+when ($JDK_REAL_VERSION == "14") {
WITH_JDK_RESOURCE=$WITH_JDK14_RESOURCE_GLOBAL
}
-when ($JDK_VERSION == "13") {
+when ($JDK_REAL_VERSION == "13") {
WITH_JDK_RESOURCE=$WITH_JDK13_RESOURCE_GLOBAL
}
-when ($JDK_VERSION == "12") {
+when ($JDK_REAL_VERSION == "12") {
WITH_JDK_RESOURCE=$WITH_JDK12_RESOURCE_GLOBAL
}
-when ($JDK_VERSION == "11") {
+when ($JDK_REAL_VERSION == "11") {
WITH_JDK_RESOURCE=$WITH_JDK11_RESOURCE_GLOBAL
}
-when ($JDK_VERSION == "10") {
+when ($JDK_REAL_VERSION == "10") {
WITH_JDK_RESOURCE=$WITH_JDK10_RESOURCE_GLOBAL
}
-when ($JDK_VERSION == "8") {
+when ($JDK_REAL_VERSION == "8") {
WITH_JDK_RESOURCE=$WITH_JDK8_RESOURCE_GLOBAL
}
# tag:java-specific
-COMPILE_JAVA=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/compile_java.py"} --javac-bin $JDK_RESOURCE/bin/javac --jar-bin $JDK_RESOURCE/bin/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 $PEERS ${requirements;hide:JAVA_REQUIREMENTS} ${kv;hide:"p JV"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} ${kv;hide:"PEERS $PEERS"}
+EXTERNAL_JAVA_JDK_RESOURCE=
+EXTERNAL_JAVA_EXTRA_PEERDIR=
+when ($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"} --javac-bin $EXTERNAL_JAVA_JDK_RESOURCE/bin/javac --jar-bin $JDK_RESOURCE/bin/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 $PEERS ${requirements;hide:JAVA_REQUIREMENTS} ${kv;hide:"p JV"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} ${kv;hide:"PEERS $PEERS"}
REAL_SWIG_DLL_JAR_CMD=$GENERATE_VCS_JAVA_INFO_NODEP && ${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/build_dll_and_java.py"} $JAVA_SWIG_DELIM $REAL_LINK_DYN_LIB $JAVA_SWIG_DELIM $COMPILE_JAVA $JAVA_SWIG_DELIM $AUTO_INPUT $JAVA_SWIG_DELIM $TARGET $JAVA_SWIG_DELIM ${output;suf=.jar:REALPRJNAME} $JAVA_SWIG_DELIM ${output;suf=-sources.jar:REALPRJNAME} $JAVA_SWIG_DELIM $ARCADIA_BUILD_ROOT $ARCADIA_ROOT
# tag:deprecated
@@ -4677,8 +4719,8 @@ ENABLE_PREVIEW_VALUE=
### Enable java preview features.
macro ENABLE_PREVIEW() {
SET_APPEND(JVM_ARGS_VALUE --enable-preview)
- SET_APPEND(JAVAC_OPTS --enable-preview --release $JDK_VERSION)
- SET_APPEND(JAVAC_FLAGS_VALUE --enable-preview --release $JDK_VERSION)
+ 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)
}
@@ -4913,7 +4955,7 @@ module _JAVA_PLACEHOLDER: _BASE_UNIT {
PEERDIR+=build/platform/java/groovy contrib/java/org/codehaus/groovy/groovy/${GROOVY_VERSION}
}
- when($ERROR_PRONE_VALUE && $JDK_VERSION == "16") {
+ when($ERROR_PRONE_VALUE && $JDK_REAL_VERSION == "16") {
JAVAC_FLAGS_VALUE+=$ERROR_PRONE_JDK16_ADD_OPENS
}
@@ -9029,31 +9071,31 @@ otherwise {
###
### Specify JDK version for module
macro JDK_VERSION(Arg) {
- SET(JDK_VERSION $Arg)
+ SET(JDK_REAL_VERSION $Arg)
_JDK_VERSION_MACRO_CHECK($Arg)
}
# tag:java-specific
-when ($JDK_VERSION == "10") {
+when ($JDK_REAL_VERSION == "10") {
JDK10=yes # remove this later
}
JAVA_PROGRAM_CP_USE_COMMAND_FILE=yes
-when ($JDK_VERSION == "8") {
+when ($JDK_REAL_VERSION == "8") {
JAVA_PROGRAM_CP_USE_COMMAND_FILE=no
}
# tag:kotlin-specific
KOTLIN_JVM_TARGET=
-when ($JDK_VERSION == "8") {
+when ($JDK_REAL_VERSION == "8") {
KOTLIN_JVM_TARGET=1.8
}
-elsewhen ($JDK_VERSION == "18") {
+elsewhen ($JDK_REAL_VERSION == "18") {
# remove when kotlin starts supporting jdk18 bytecode
# see also devtools/ya/jbuild/gen/actions/idea.py
KOTLIN_JVM_TARGET=17
}
otherwise {
- KOTLIN_JVM_TARGET=$JDK_VERSION
+ KOTLIN_JVM_TARGET=$JDK_REAL_VERSION
}
# tag:frontend-specific