jberkel/android-plugin — pull request #115 by mkneissl (2012-02-08 08:39:38+00:00)
Title: Run javah to generate JNI C header files.

When using JNI one typically uses javah to generate a C header containing the constants and function declarations for classes that contain native methods.

This patch lets SBT run javah to generate the header file for a given set of classes.

Setting `jniClasses in Android` specifies the classes with native methods for which C headers should be generated.

By default, javah will generate a separate C header file for each JNI class. To generate a single C header file instead, set `javahOutputFile in Android`.

The make environment variable `SBT_MANAGED_JNI_INCLUDE` can be used to refer to the directory containing the generated header files.

```make
# Android.mk
LOCAL_C_INCLUDES += \
... \
$(SBT_MANAGED_JNI_INCLUDE)
```

For more details see the settings defined in `AndroidNdkKeys`.