diff options
author | Tristan Partin <tristan@partin.io> | 2021-06-19 01:50:15 -0500 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-08-22 07:57:29 -0700 |
commit | be92e3783751b8bf1481dc81635e86b70977698a (patch) | |
tree | e86b3752ebe1ee6c2e4b7dbef56269f0707b7d82 /docs/markdown | |
parent | cd9db63bfbabdc241cc12805ffd84309d90346ab (diff) | |
download | meson-be92e3783751b8bf1481dc81635e86b70977698a.zip meson-be92e3783751b8bf1481dc81635e86b70977698a.tar.gz meson-be92e3783751b8bf1481dc81635e86b70977698a.tar.bz2 |
Add Java module
The Java module will serve as a source for easing Java development
within Meson. Currently it only supports generating native header files.
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/Java-module.md | 15 | ||||
-rw-r--r-- | docs/markdown/snippets/java_module.md | 18 |
2 files changed, 33 insertions, 0 deletions
diff --git a/docs/markdown/Java-module.md b/docs/markdown/Java-module.md new file mode 100644 index 0000000..9857de7 --- /dev/null +++ b/docs/markdown/Java-module.md @@ -0,0 +1,15 @@ +# Java Module + +*Added 0.60.0* + +## Functions + +### `generate_native_header()` + +This function will generate a header file for use in Java native module +development by reading the supplied Java file for `native` method declarations. + +Keyword arguments: + +- `package`: The [package](https://en.wikipedia.org/wiki/Java_package) of the +file. If left empty, Meson will assume that there is no package. diff --git a/docs/markdown/snippets/java_module.md b/docs/markdown/snippets/java_module.md new file mode 100644 index 0000000..b806aee --- /dev/null +++ b/docs/markdown/snippets/java_module.md @@ -0,0 +1,18 @@ +## Java Module + +The Java module has been added to Meson. The Java module allows users to +generate native header files without needing to use a `custom_target()`. + +```meson +jmod = import('java') + +native_header = jmod.generate_native_header('File.java', package: 'com.mesonbuild') +native_header_includes = include_directories('.') + +jdkjava = shared_module( + 'jdkjava', + [native_header_includes, other_sources], + dependencies : [jdk], + include_directories : [native_header_includes] +) +``` |