aboutsummaryrefslogtreecommitdiffstats
path: root/build/conf/jbuild.ymake.conf
diff options
context:
space:
mode:
authorDevtools Arcadia <arcadia-devtools@yandex-team.ru>2022-02-07 18:08:42 +0300
committerDevtools Arcadia <arcadia-devtools@mous.vla.yp-c.yandex.net>2022-02-07 18:08:42 +0300
commit1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch)
treee26c9fed0de5d9873cce7e00bc214573dc2195b7 /build/conf/jbuild.ymake.conf
downloadydb-1110808a9d39d4b808aef724c861a2e1a38d2a69.tar.gz
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'build/conf/jbuild.ymake.conf')
-rw-r--r--build/conf/jbuild.ymake.conf122
1 files changed, 122 insertions, 0 deletions
diff --git a/build/conf/jbuild.ymake.conf b/build/conf/jbuild.ymake.conf
new file mode 100644
index 0000000000..945a7cc979
--- /dev/null
+++ b/build/conf/jbuild.ymake.conf
@@ -0,0 +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)
+ PEERDIR+=$JDK_RESOURCE_PEERDIR
+
+ PROPAGATES_MANAGEABLE_PEERS=yes
+ SET(SWIG_LANG java)
+}