aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/java.py
AgeCommit message (Collapse)AuthorFilesLines
2022-03-29move a bunch of imports into TYPE_CHECKING blocksEli Schwartz1-3/+9
These are only used for type checking, so don't bother importing them at runtime. Generally add future annotations at the same time, to make sure that existing uses of these imports don't need to be quoted.
2022-03-29Pass environment down to base Target classXavier Claessens1-1/+6
2022-03-07treewide: string-quote the first argument to T.castEli Schwartz1-1/+1
Using future annotations, type annotations become strings at runtime and don't impact performance. This is not possible to do with T.cast though, because it is a function argument instead of an annotation. Quote the type argument everywhere in order to have the same effect as future annotations. This also allows linters to better detect in some cases that a given import is typing-only.
2022-03-07Fix @typed_pos_args on java.generate_native_headersTristan Partin1-5/+6
2022-03-04Port JavaModule to NewExtensionModule APITristan Partin1-18/+25
2022-03-04Fix @typed_pos args on java.generate_native_headerTristan Partin1-2/+1
2022-03-01Deprecate java.generate_native_header() in favor of ↵Tristan Partin1-3/+44
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.
2022-01-28build: replace kwargs in CustomTarget initializerDylan Baker1-8/+10
Because we don't want to pass the Interpreter kwargs into the build layer. This turned out to be a mega commit, as there's really on elegant way to make this change in an incremental way. On the nice side, mypy made this change super easy, as nearly all of the calls to `CustomTarget` are fully type checked! It also turns out that we're not handling install_tags in custom_target correctly, since we're not converting the boolean values into Optional values!
2021-10-27fix various flake8 whitespace errorsEli Schwartz1-1/+1
2021-08-23java module: fix FeatureNew versionEli Schwartz1-1/+1
It should apply to the *next* stable release. Reported-by: Tristan Partin <tristan@partin.io>
2021-08-22Add Java moduleTristan Partin1-0/+76
The Java module will serve as a source for easing Java development within Meson. Currently it only supports generating native header files.