123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- 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})
- PEERDIR(devtools/jtest-annotations/junit5)
- # 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)
- PEERDIR(devtools/jtest-annotations/junit4)
- # 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(devtools/jtest-annotations/junit4 $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
- SWIG_LANG=java
- }
|