JniLibProducerExtension

abstract class JniLibProducerExtension @Inject constructor(val project: Project) : HasProject

Configuration for JniLibProducerPlugin.

Constructors

Link copied to clipboard
@Inject
constructor(project: Project)

Properties

Link copied to clipboard
val allowSeveralHooks: Property<Boolean>

By default, only one function annotated with @JniOnLoad is allowed. The same with @JniOnUnload. Set this to true to allow multimple load listeners and finalizers.

Link copied to clipboard
val expectedJdkVersion: Property<Int>

JNI of this Java version will be available inside JNI functions.

Link copied to clipboard
val exportJniBindingInfoTaskProvider: TaskProvider<WriteProperties>

Generates the infoFile file describing binding configuration.

Link copied to clipboard
val exportJniBindingTaskProvider: TaskProvider<Task>

Generates the whole jniBindings directory: binding info, actuals info and native binaries.

Link copied to clipboard

There are two methods to link external (or native in Java) methods to their native implementation:

Link copied to clipboard
val infoFile: Provider<RegularFile>

jniBindings/info.properties file that describes settings to generate a binding.

Link copied to clipboard
open override val project: Project