aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Java-module.md15
-rw-r--r--docs/markdown/snippets/java_module.md18
-rw-r--r--docs/sitemap.txt1
-rw-r--r--docs/theme/extra/templates/navbar_links.html1
4 files changed, 35 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]
+)
+```
diff --git a/docs/sitemap.txt b/docs/sitemap.txt
index 573aed6..b659a1a 100644
--- a/docs/sitemap.txt
+++ b/docs/sitemap.txt
@@ -44,6 +44,7 @@ index.md
Gnome-module.md
Hotdoc-module.md
Icestorm-module.md
+ Java-module.md
Keyval-module.md
Pkgconfig-module.md
Python-3-module.md
diff --git a/docs/theme/extra/templates/navbar_links.html b/docs/theme/extra/templates/navbar_links.html
index 904a499..71d4bce 100644
--- a/docs/theme/extra/templates/navbar_links.html
+++ b/docs/theme/extra/templates/navbar_links.html
@@ -15,6 +15,7 @@
("Hotdoc-module.html","Hotdoc"), \
("i18n-module.html","i18n"), \
("Icestorm-module.html","Icestorm"), \
+ ("Java-module.html","Java") \
("Keyval-module.html","Keyval"), \
("Pkgconfig-module.html","Pkgconfig"), \
("Python-3-module.html","Python 3"), \