gradle-plugin, readme: Use relative links
This commit is contained in:
+6
-6
@@ -50,7 +50,7 @@ details). The plugin uses `src/main/kotlin/` as a default directory for sources.
|
||||
## Using C interop
|
||||
|
||||
Kotlin/Native provides an easy interaction with native C libraries. The detailed description of this mechanism
|
||||
can be found in [`INTEROP.md`](https://github.com/JetBrains/kotlin-native/blob/master/INTEROP.md) while this section
|
||||
can be found in [`INTEROP.md`](INTEROP.md) while this section
|
||||
describes how to use Gradle to build Kotlin/Native apps using C libraries.
|
||||
|
||||
All the C libraies used should be defined in `konanInterop` block.
|
||||
@@ -62,16 +62,15 @@ All the C libraies used should be defined in `konanInterop` block.
|
||||
}
|
||||
|
||||
Each element (interop) in this block corresponds to some native library described by a def-file (see
|
||||
[`INTEROP.md`](https://github.com/JetBrains/kotlin-native/blob/master/INTEROP.md) to read more about def-files). The
|
||||
default path to the def-file of an interop is `src/main/c_interop/<interop-name>.def`.
|
||||
[`INTEROP.md`](INTEROP.md) to read more about def-files). The default path to the def-file of an interop is
|
||||
`src/main/c_interop/<interop-name>.def`.
|
||||
|
||||
Each interop is processed by the plugin in two steps:
|
||||
|
||||
1. Stub generation. In this step the plugin uses `cinterop` tool to generate Kotlin and bitcode (*.bc) stubs for the
|
||||
library. You can specify additional parameters for this tool in the interop block (e.g. a custom def-file is specified
|
||||
in the example above). See [**Plugin DSL**](#plugin-dsl) section below for available parameters and
|
||||
[`INTEROP.md`](https://github.com/JetBrains/kotlin-native/blob/master/INTEROP.md) for `cinterop` tool
|
||||
description.
|
||||
[`INTEROP.md`](INTEROP.md) for `cinterop` tool description.
|
||||
2. Stub compilation. In this step the plugin uses Kotlin/Native compiler to compile the stubs generated by the step (1)
|
||||
into a klib which can be linked with a Kotlin/Native application.
|
||||
|
||||
@@ -97,6 +96,7 @@ You also can use an interop from another project:
|
||||
### Tasks
|
||||
|
||||
The Kotlin/Native plugin creates the following tasks:
|
||||
|
||||
* __compileKonan*ArtifactName*__. The plugin creates such a task for each an artifact defined in a `konanArtifacts` block.
|
||||
You may get this task using the `compilationTask` property of an artifact or by its name:
|
||||
|
||||
@@ -250,7 +250,7 @@ For this project the task graph will be the following:
|
||||
konanInterop {
|
||||
interopName {
|
||||
defFile project.file("deffile.def") // Def-file for stub generation.
|
||||
pkg 'org.sample' // Package to place the stubs generated.
|
||||
pkg 'org.sample' // Package to place stubs generated.
|
||||
target 'macbook' // Target platform.
|
||||
|
||||
// Options to be passed to compiler and linker by cinterop tool.
|
||||
|
||||
Reference in New Issue
Block a user