Minor: improve table formatting

This commit is contained in:
Ilya Gorbunov
2018-02-03 05:05:33 +03:00
parent ad385f42a9
commit aa74f163f7
@@ -5,11 +5,13 @@
### kotlin ### kotlin
How to apply: How to apply:
``` ```
apply plugin: 'kotlin' apply plugin: 'kotlin'
``` ```
Tasks: Tasks:
| Name | Type | Description | Name | Type | Description
|------------------------------|--------------------|---------------| |------------------------------|--------------------|---------------|
| compileKotlin | [KotlinJvmCompile] | A task is created for `main` source set | | compileKotlin | [KotlinJvmCompile] | A task is created for `main` source set |
@@ -17,6 +19,7 @@ Tasks:
| compile*SourceSetName*Kotlin | [KotlinJvmCompile] | A task is created for each additional source set | | compile*SourceSetName*Kotlin | [KotlinJvmCompile] | A task is created for each additional source set |
Each [KotlinJvmCompile] task provides `kotlinOptions` ([KotlinJvmOptions]) extension: Each [KotlinJvmCompile] task provides `kotlinOptions` ([KotlinJvmOptions]) extension:
``` ```
compileKotlin { compileKotlin {
kotlinOptions { kotlinOptions {
@@ -31,16 +34,19 @@ compileKotlin {
A plugin that should be used for Android development. A plugin that should be used for Android development.
How to apply: How to apply:
``` ```
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
``` ```
Tasks: Tasks:
| Name | Type | Description | Name | Type | Description
|------------------------------|--------------------|---------------| |------------------------------|--------------------|---------------|
| compile*VariantName*Kotlin | [KotlinJvmCompile] | A task is created for each variant | | compile*VariantName*Kotlin | [KotlinJvmCompile] | A task is created for each variant |
Note that tasks are created after evaluation, so all references to tasks should be done in `afterEvaluate` section: Note that tasks are created after evaluation, so all references to tasks should be done in `afterEvaluate` section:
``` ```
afterEvaluate { afterEvaluate {
compileDebugKotlin { compileDebugKotlin {
@@ -52,6 +58,7 @@ afterEvaluate {
``` ```
Android plugin also adds `kotlinOptions` extension to `android` section to set options for all kotlin tasks: Android plugin also adds `kotlinOptions` extension to `android` section to set options for all kotlin tasks:
``` ```
android { android {
kotlinOptions { kotlinOptions {
@@ -61,6 +68,7 @@ android {
``` ```
Task's `kotlinOptions` "override" ones in `android` section: Task's `kotlinOptions` "override" ones in `android` section:
``` ```
android { android {
kotlinOptions { kotlinOptions {
@@ -82,11 +90,13 @@ afterEvaluate {
### kotlin2js ### kotlin2js
How to apply: How to apply:
``` ```
apply plugin: 'kotlin2js' apply plugin: 'kotlin2js'
``` ```
Tasks: Tasks:
| Name | Type | Description | Name | Type | Description
|--------------------------------|--------------------|---------------| |--------------------------------|--------------------|---------------|
| compileKotlin2Js | [KotlinJsCompile] | A task is created for `main` source set | | compileKotlin2Js | [KotlinJsCompile] | A task is created for `main` source set |
@@ -94,6 +104,7 @@ Tasks:
| compile*SourceSetName*Kotlin2Js| [KotlinJsCompile] | A task is created for each additional source set | | compile*SourceSetName*Kotlin2Js| [KotlinJsCompile] | A task is created for each additional source set |
Each [KotlinJsCompile] task provides `kotlinOptions` ([KotlinJsOptions]) extension: Each [KotlinJsCompile] task provides `kotlinOptions` ([KotlinJsOptions]) extension:
``` ```
compileKotlin2Js { compileKotlin2Js {
kotlinOptions { kotlinOptions {