Add JNI support

It would be nice if a JNI plugin existed (could use cpp-lib plugin with it) that found all classes with native methods, ran javah on them, and compiled everything under the cpp folder into an JNI library.

Definitely need a task for running javah.

This type of feature is becoming absolutely essential for my company, since we have a lot of both Java and C++ code.

In particular - making sure that javah is run with the correct classpath that includes all of the Java dependencies.

It would also be great if the collection of all javah-generated headers had an associated Zip task, on the same level as the default Jar task, so that it would be easier to publish the zip and clean it as part of the default “clean” task.

Hi Patrick,

This is something we definitely want as well. If you’re interested in making it happen soon, we’d love to get some help. If you’re interested in contributing to this feature, please let us know.

any news on this?

1 Like