summaryrefslogtreecommitdiff
path: root/test cases/java
Commit message (Collapse)AuthorAgeFilesLines
* test cases: use best practices method to find the python3 programEli Schwartz2023-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | We do not need the python module's find_installation() for this, as this does various things to set up building and installing python modules (pure python and C-API). This functionality is already tested in the python tests. Elsewhere, when we just need an interpreter capable of running python scripts in order to guarantee a useful scripting language for custom commands, it suffices to use find_program(), which does not run an introspection script or do module imports, and is thus faster and a bit cleaner. Either way, both methods are guaranteed to find the python3 interpreter, deferring to mesonlib.python_command for that guarantee. test "71 summary" can sometimes return the python command with the ".exe" part all uppercased for mysterious Windows reasons. Smooth this over with ExternalProgram.
* Try to find the jni dependency when javac is a Darwin stubTristan Partin2022-12-151-0/+6
| | | | | | | | | | | | | Darwin-based systems, at least macOS, provide various JDK executable stubs in /System/Library/Frameworks/JavaVM.framework/Versions/*/Commands. These stubs are placed in such a way that they break the heuristics of the JNI system dependency. If a javac being analyzed to find a Java home is a stub, use /usr/libexec/java_home. See https://stackoverflow.com/a/15133344/7572728 for more details. Closes #11173
* Rename java.generate_native_headers to java.native_headersTristan Partin2022-12-111-1/+1
| | | | | This follows the Meson naming scheme which typically leaves off a verb like generate.
* Add ability to add resources to jarsTristan Partin2022-03-225-0/+48
| | | | | | Previously Meson lacked the ability to add resources to jar files. Fixes #9945
* Fix @typed_pos_args on java.generate_native_headersTristan Partin2022-03-075-17/+33
|
* Add modules kwarg to JNI system depTristan Partin2022-03-041-1/+1
| | | | This allows someone to link against libjvm.so and libjawt.so.
* Rename JDK system dep to JNITristan Partin2022-03-0210-52/+52
| | | | | | | | | JNI is a more apt name because it currently only supports the JNI. I also believe that CMake uses the terminology JNI here as well. JNI is currently the only way to interact with the JVM through native code, but there is a project called "Project Panama" which aims to be another way for native code to interact with the JVM.
* Deprecate java.generate_native_header() in favor of ↵Tristan Partin2022-03-012-2/+3
| | | | | | | | | | | | | | | | | java.generate_native_headers() After implementing a much more extensive Java native module than what currently exists in the tests, I found shortcomings. 1. You need to be able to pass multiple Java files. 2. Meson needs more information to better track the generated native headers. 3. Meson wasn't tracking the header files generated from inner classes. This new function should fix all the issues the old function had with room to grow should more functionality need to be added. What I implemented here in this new function is essentially what I have done in the Heterogeneous-Memory Storage Engine's Java bindings.
* Add Java moduleTristan Partin2021-08-224-25/+13
| | | | | The Java module will serve as a source for easing Java development within Meson. Currently it only supports generating native header files.
* editorconfig: add setting to trim trailing whitespaceEli Schwartz2021-08-154-7/+6
| | | | | | | and clean up all outstanding issues Skip 'test cases/common/141 special characters/meson.build' since it intentionally uses trailing newlines.
* dependency: Add JDK system dependencyTristan Partin2021-04-127-0/+105
| | | | | The JDK system dependency is important for detecting JDK include paths that may be useful when developing a JNI interface.
* Decrease version requirement to work on Xenial.Jussi Pakkanen2020-07-121-2/+2
|
* docs: Add Environment variables for compiler/linker selectionDylan Baker2020-03-171-0/+4
| | | | | We really should be documenting these in an easy to find and reference place.
* test: merge installed_files.txt into test.jsonDaniel Mensinger2020-02-252-1/+5
|
* Bump Java version in test program.Jussi Pakkanen2020-01-291-2/+2
|
* tests/java: force latency in generation to exercise raceDylan Baker2018-11-071-1/+1
| | | | | | Because we are racing here. In reality *all* of the java in that target may rely on the generated file, so we need to block all of them, like we would for headers in C/C++.
* ninjabackend: add generated source files to jar compile target source listAurélien Zanelli2018-11-025-0/+54
| | | | | Otherwise, passing result of custom_target() to jar() target is ignored and won't be compiled resulting in build fail.
* java: add jar linking testNiclas Moeslund Overby2018-07-034-0/+26
|
* tests: Remove redundant test and include_directories('.')Niclas Moeslund Overby2018-05-1610-39/+1
|
* ninja: add build dir to javac -sourcepathRobert Bragg2018-05-165-0/+52
| | | | | | To allow the javac -implicit:class behaviour to know where to find generated .java files then the build directory for the target is also added to the -sourcefile path.
* ninja: avoid needing include_directory('.') with jar()Robert Bragg2018-05-163-0/+36
| | | | | | | | | | | | | | | | | | Although only one file is passed to javac at a time, if your code has any inter-file dependencies javac still needs to know how to find other source files for its -implicit:class feature to work whereby it will automatically also compile files that the given file depends on. -implicit:class is the default, practical, behaviour of javac since otherwise it would be necessary to declare the class dependencies for parallel java builds to be feasible. Passing "include_directory: include_directory('.')" to jar() causes -souredir <path/to/top/of/java/src> to be passed to javac which then enables your source code to have inter-file class dependencies - assuming none of your source code is generated. This ensures that '.' is included by default.
* ninja: pass separated paths to javac -sourcepathRobert Bragg2018-05-163-0/+37
| | | | | | The -sourcepath option can't be passed multiple times to javac, since it simply overrides prior arguments. Instead -sourcepath takes a colon (or semi-colon on windows) separated list of paths.
* Do not strip jar targets. Closes #1343.Jussi Pakkanen2017-02-062-1/+4
|
* Make Java compilation work with inner classes. Closes #1157.Jussi Pakkanen2016-12-122-0/+20
|
* Can set compiler arguments in Java.Jussi Pakkanen2016-11-202-0/+16
|
* Build Java projects with multiple files and other cleanups.Jussi Pakkanen2016-01-106-12/+30
|
* Now with working subdirs for Java.Jussi Pakkanen2014-03-113-0/+13
|
* Can run built jar files.Jussi Pakkanen2014-03-111-1/+2
|
* A few tweaks.Jussi Pakkanen2014-03-111-1/+1
|
* Started work on Java support because why not.Jussi Pakkanen2014-03-102-0/+11