Package-level declarations

Types

Link copied to clipboard

Method of linkage external Kotlin methods (or native Java methods) with their native implementation.

Link copied to clipboard
abstract class JniLibProducerExtension @Inject constructor(val project: Project) : HasProject

Configuration for JniLibProducerPlugin.

Link copied to clipboard
class JniLibProducerPlugin : KotlinCompilerPluginSupportPlugin

Plugin for producing JNI libraries.

Properties

Link copied to clipboard

Distribution downloadCompatibleJdk uses when it is not told otherwise.

Link copied to clipboard
val Architecture.jdkArchitecture: Architecture

Architecture of this binary's target, which is the one a JDK linked into it has to be built for.

Link copied to clipboard
val NativeBinary.jdkOperatingSystem: OperatingSystem

Operating system of this binary's target, which is the one a JDK linked into it has to be built for.

Functions

Link copied to clipboard
fun NativeBinary.downloadCompatibleJdk(os: OperatingSystem = jdkOperatingSystem, arch: Architecture = target.konanTarget.architecture.jdkArchitecture, distribution: String = DEFAULT_JDK_DISTRIBUTION): Provider<Directory>

Provides the latest JDK of the Java version of JniLibProducerExtension.expectedJdkVersion built for the platform of this binary's target, to link against.

fun NativeBinary.downloadCompatibleJdk(version: Int, distribution: String = DEFAULT_JDK_DISTRIBUTION, os: OperatingSystem = jdkOperatingSystem, arch: Architecture = target.konanTarget.architecture.jdkArchitecture): Provider<Directory>

Provides the latest JDK of a major version built for the platform of this binary's target, to link against.

fun NativeBinary.downloadCompatibleJdk(version: String, distribution: String = DEFAULT_JDK_DISTRIBUTION, os: OperatingSystem = jdkOperatingSystem, arch: Architecture = target.konanTarget.architecture.jdkArchitecture): Provider<Directory>

Provides the JDK of exactly version built for the platform of this binary's target, to link against.

Link copied to clipboard
fun NativeBinary.linkJAwt()

Adds the JAWT library (libjawt) to the native linker options.

Link copied to clipboard
fun NativeBinary.linkJvm()

Adds the JVM runtime library (libjvm) to the native linker options.

fun NativeBinary.linkJvm(javaHome: File)
fun NativeBinary.linkJvm(javaHome: Path)
@JvmName(name = "linkJvmFileProvider")
fun NativeBinary.linkJvm(javaHome: Provider<File>)

Adds the JVM runtime library (libjvm) linked against the JDK at javaHome.

fun NativeBinary.linkJvm(languageVersion: Int)

Adds the JVM runtime library (libjvm) linked against the Gradle Java toolchain of the given languageVersion.

fun NativeBinary.linkJvm(toolchainSpec: Action<JavaToolchainSpec>)

Adds the JVM runtime library (libjvm) linked against the JDK resolved from toolchainSpec.

fun NativeBinary.linkJvm(javaHome: Provider<Directory>)

Adds the JVM runtime library (libjvm) linked against the JDK in javaHome.

Link copied to clipboard
fun NativeBinary.linkX11IfLinux(libraryPath: String? = null)

Adds Linux X11 linker options.