jni-binding

Kotlin/Native bindings for the Java Native Interface (JNI). The module wraps the C JNI API into idiomatic Kotlin - null-safe reference types, context(JniEnv) parameters, DSLs and small helpers - so the native side of a JNI library can be written without C and without any manual cinterop setup.

It targets both desktop (mingwX64, linuxX64, linuxArm64, macosArm64) and Android Native (androidNativeArm32/64, androidNativeX86/X64). Desktop builds sit on jni-binding-raw; Android builds use the platform NDK headers.

The producer Gradle plugin adds this artifact to native source sets automatically. Combine it with jni-binding-annotations and the producer/consumer plugins to keep the JVM and native sides of your bindings in sync - see the repository README. Every function mirrors its JNI counterpart one-to-one; the JNI Specification is the authoritative behaviour reference.

Kotlin/Native bindings for the Java Native Interface (JNI). The module wraps the C JNI API into idiomatic Kotlin - null-safe reference types, context(JniEnv) parameters, DSLs and small helpers - so the native side of a JNI library can be written without C and without any manual cinterop setup.

It targets both desktop (mingwX64, linuxX64, linuxArm64, macosArm64) and Android Native (androidNativeArm32/64, androidNativeX86/X64). Desktop builds sit on jni-binding-raw; Android builds use the platform NDK headers.

The producer Gradle plugin adds this artifact to native source sets automatically. Combine it with jni-binding-annotations and the producer/consumer plugins to keep the JVM and native sides of your bindings in sync - see the repository README. Every function mirrors its JNI counterpart one-to-one; the JNI Specification is the authoritative behaviour reference.

Kotlin/Native bindings for the Java Native Interface (JNI). The module wraps the C JNI API into idiomatic Kotlin - null-safe reference types, context(JniEnv) parameters, DSLs and small helpers - so the native side of a JNI library can be written without C and without any manual cinterop setup.

It targets both desktop (mingwX64, linuxX64, linuxArm64, macosArm64) and Android Native (androidNativeArm32/64, androidNativeX86/X64). Desktop builds sit on jni-binding-raw; Android builds use the platform NDK headers.

The producer Gradle plugin adds this artifact to native source sets automatically. Combine it with jni-binding-annotations and the producer/consumer plugins to keep the JVM and native sides of your bindings in sync - see the repository README. Every function mirrors its JNI counterpart one-to-one; the JNI Specification is the authoritative behaviour reference.

Packages

Link copied to clipboard
androidNative
desktop
native

Core bindings: all JNI types, the JNI object with version constants, the Invocation API (createJavaVM, attachCurrentThread, …), every function of the JNI JniEnv interface, and Kotlin utilities around them.

native

High-level typed access to Java methods, fields and arrays - Kotlin lambdas, ReadWriteProperty delegates and scoped DSLs. Everything here stays context(JniEnv, MemScope) / NativePlacement-friendly.