class Things { - static native long createThing(String name, int count); + static native long createThing(String name, int count, byte[] buffer); } ├── build │ ├── classes │ │ └── java │ │ └── main │ │ └── com │ │ └── example │ │ └── Things.class │ ├── generated │ │ └── sources │ ⋮ └── headers │ └── java │ └── main │ └── com_example_Things.h ⋮ ├── build.gradle ├── src │ └── main │ └── java │ └── com │ └── example │ └── Example.java └── things.c If your native build occurs outside Gradle, the compileJava task should be run first, then the external native build, and finally (with the native binaries put somewhere like src/main/resources/ ) the full assemble or build task can be run.