From ad0c44d097aa3dede62ba544d2fe0533eff883b4 Mon Sep 17 00:00:00 2001 From: Ilya Matveev Date: Tue, 15 Aug 2017 19:26:52 +0700 Subject: [PATCH] gradle-plugin, readme: Add links --- GRADLE_PLUGIN.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/GRADLE_PLUGIN.md b/GRADLE_PLUGIN.md index 8023b9e8c15..d54864795dc 100644 --- a/GRADLE_PLUGIN.md +++ b/GRADLE_PLUGIN.md @@ -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. 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. konanArtifacts { @@ -50,8 +50,8 @@ 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` while this section describes how to use Gradle to build Kotlin/Native apps using -C libraries. +can be found in [`INTEROP.md`](https://github.com/JetBrains/kotlin-native/blob/master/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. @@ -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 -read more about def-files). The default path to the def-file of an interop is `src/main/c_interop/.def`. +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/.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** 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. 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. @@ -197,7 +199,7 @@ For this project the task graph will be the following: genBarInteropStubs clean -### Plugin DSL +## Plugin DSL konanArtifacts { artifactName {