gradle-plugin, readme: Add links

This commit is contained in:
Ilya Matveev
2017-08-15 19:26:52 +07:00
committed by ilmat192
parent 80dcd012e4
commit ad0c44d097
+9 -7
View File
@@ -33,7 +33,7 @@ project property (e.g. in `gradle.properties`). Note: the plugin ignores the `ko
In this case the compiler will not be downloaded by the plugin. In this case the compiler will not be downloaded by the plugin.
To use the plugin you need to define artifacts you want to build in the `konanArtifacts` block. Here you can specify To use the plugin you need to define artifacts you want to build in the `konanArtifacts` block. Here you can specify
source files and compilation parameters (e.g. a target platform) for each artifact (see **Plugin DSL** section below for source files and compilation parameters (e.g. a target platform) for each artifact (see [**Plugin DSL**](#plugin-dsl) section below for
details). The plugin uses `src/main/kotlin/` as a default directory for sources. details). The plugin uses `src/main/kotlin/` as a default directory for sources.
konanArtifacts { konanArtifacts {
@@ -50,8 +50,8 @@ details). The plugin uses `src/main/kotlin/` as a default directory for sources.
## Using C interop ## Using C interop
Kotlin/Native provides an easy interaction with native C libraries. The detailed description of this mechanism Kotlin/Native provides an easy interaction with native C libraries. The detailed description of this mechanism
can be found in `INTEROP.md` while this section describes how to use Gradle to build Kotlin/Native apps using can be found in [`INTEROP.md`](https://github.com/JetBrains/kotlin-native/blob/master/INTEROP.md) while this section
C libraries. describes how to use Gradle to build Kotlin/Native apps using C libraries.
All the C libraies used should be defined in `konanInterop` block. All the C libraies used should be defined in `konanInterop` block.
@@ -61,14 +61,16 @@ 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` to Each element (interop) in this block corresponds to some native library described by a def-file (see
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`](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`.
Each interop is processed by the plugin in two steps: 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 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 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** section below for available parameters and `INTEROP.md` for `cinterop` tool 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. description.
2. Stub compilation. In this step the plugin uses Kotlin/Native compiler to compile the stubs generated by the step (1) 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. into a klib which can be linked with a Kotlin/Native application.
@@ -197,7 +199,7 @@ For this project the task graph will be the following:
genBarInteropStubs genBarInteropStubs
clean clean
### Plugin DSL ## Plugin DSL
konanArtifacts { konanArtifacts {
artifactName { artifactName {