JniLibraryConfig

class JniLibraryConfig : HasProject, Named

Configuration of a single JNI library used by a JVM/Android compilation.

Configures per-platform binding sources (see targets), extra actuals policy, and where the binaries of the individual targets are packaged (see JniBindingTarget.copyToResources and JniBindingTarget.copyToJniLibs).

Properties

Link copied to clipboard
val actualsFiles: FileCollection

Resolved producers' actuals.json files for every target of this library.

Link copied to clipboard

Suppresses the error when binding files (native binary) are missing.

Link copied to clipboard
val allowExtraActuals: Property<Boolean>

By default, all functions annotated with @JniActual must have @JniExpect counterpart.

Link copied to clipboard
val consumerCompilation: KotlinCompilation<*>

The consumer compilation this library is wired to.

Link copied to clipboard
val importLibTaskProvider: TaskProvider<Sync>

Task that mirrors the binaries of this library's packaged targets into importedLibrariesDir.

Link copied to clipboard

Name of the native library, e.g. "native".

Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val project: Project
Link copied to clipboard
val targets: NamedDomainObjectContainer<JniBindingTarget>

All platform targets of this library. Register new ones with target or its shortcuts (e.g. mingwX64, linuxX64).

Functions

Link copied to clipboard
fun JniLibraryConfig.androidArm32(name: String = "androidNativeArm32", configure: Action<JniBindingTarget> = {}): JniBindingTarget

Registers the Android Native ARM32 target.

Link copied to clipboard
fun JniLibraryConfig.androidArm64(name: String = "androidNativeArm64", configure: Action<JniBindingTarget> = {}): JniBindingTarget

Registers the Android Native ARM64 target.

Link copied to clipboard
fun JniLibraryConfig.androidX64(name: String = "androidNativeX64", configure: Action<JniBindingTarget> = {}): JniBindingTarget

Registers the Android Native x86_64 target.

Link copied to clipboard
fun JniLibraryConfig.androidX86(name: String = "androidNativeX86", configure: Action<JniBindingTarget> = {}): JniBindingTarget

Registers the Android Native x86 target.

Link copied to clipboard
open override fun getName(): String
Link copied to clipboard
fun JniLibraryConfig.linuxArm64(name: String = "linuxArm64", configure: Action<JniBindingTarget> = {}): JniBindingTarget

Registers the Linux ARM64 target.

Link copied to clipboard
fun JniLibraryConfig.linuxX64(name: String = "linuxX64", configure: Action<JniBindingTarget> = {}): JniBindingTarget

Registers the Linux x86_64 target.

Link copied to clipboard
fun JniLibraryConfig.macosArm64(name: String = "macosArm64", configure: Action<JniBindingTarget> = {}): JniBindingTarget

Registers the macOS ARM64 (Apple Silicon) target.

Link copied to clipboard
fun JniLibraryConfig.mingwX64(name: String = "mingwX64", configure: Action<JniBindingTarget> = {}): JniBindingTarget

Registers the Windows mingwX64 target.

Link copied to clipboard
fun target(name: String, os: String, arch: String, abi: String, konanTarget: KonanTarget?, configure: Action<JniBindingTarget>): JniBindingTarget

Registers and configures a new platform target.