When marking a method as native in Java, our Gradle task generateJniHeaders will generate its prototype declaration in a JNI header file for the C++ bridge to include and implement. It would be nice if we could verify that all of our native methods have been at least defined in the bridge somewhere.
Example flow:
- Scan all JNI header files and parse each method signature. (e.g. files in
BWAPI4J/src/native/include/)
- Scan all bridge C++ files for the implementation. (e.g. files in
BWAPI4JBridge/src/)
- Throw an error message if an implementation is missing.
- Throw an error message if an implementation is present but has no corresponding prototype declaration found in the JNI header files.