Explicitly enable Dokka javadocs generation

Actually we don't need javadoc generation for our internal stuff like
':kotlin-gradle-plugin'. But ':kotlin-gradle-plugin-api' is a public api
 and should have properly generated javadocs.

^KT-55520 In Progress
This commit is contained in:
Yahor Berdnikau
2023-01-12 10:47:14 +01:00
committed by Space Team
parent 18e9496ea4
commit 4de60879f0
6 changed files with 47 additions and 181 deletions
@@ -4,6 +4,8 @@ plugins {
id("org.jetbrains.kotlinx.binary-compatibility-validator")
}
configureDokkaPublication()
dependencies {
commonApi(platform(project(":kotlin-gradle-plugins-bom")))
commonApi(project(":kotlin-gradle-plugin-annotations"))
@@ -1,117 +0,0 @@
# Module kotlin-gradle-plugin
`kotlin-gradle-plugin` artifact provides multiple plugins.
### kotlin
How to apply:
```
apply plugin: 'kotlin'
```
Tasks:
| Name | Type | Description
|------------------------------|--------------------|---------------|
| compileKotlin | [KotlinJvmCompile] | A task is created for `main` source set |
| compileTestKotlin | [KotlinJvmCompile] | A task is created for `test` source set |
| compile*SourceSetName*Kotlin | [KotlinJvmCompile] | A task is created for each additional source set |
Each [KotlinJvmCompile] task provides `kotlinOptions` ([KotlinJvmOptions]) extension:
```
compileKotlin {
kotlinOptions {
noStdlib = true
}
// kotlinOptions.noStdlib = true
}
```
### kotlin-android
A plugin that should be used for Android development.
How to apply:
```
apply plugin: 'kotlin-android'
```
Tasks:
| Name | Type | Description
|------------------------------|--------------------|---------------|
| 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:
```
afterEvaluate {
compileDebugKotlin {
kotlinOptions {
noStdlib = true
}
}
}
```
Android plugin also adds `kotlinOptions` extension to `android` section to set options for all kotlin tasks:
```
android {
kotlinOptions {
noStdlib = true
}
}
```
Task's `kotlinOptions` "override" ones in `android` section:
```
android {
kotlinOptions {
noStdlib = true
}
}
afterEvaluate {
compileDebugKotlin {
kotlinOptions {
noStdlib = false
}
}
}
// compileProductionKotlin.noStdlib == true
// compileDebugKotlin.noStdlib == false
```
### Kotlin/JS
How to apply:
```
plugins {
id 'org.jetbrains.kotlin.js'
}
```
Tasks:
| Name | Type | Description
|--------------------------------|--------------------|---------------|
| compileKotlin2Js | [KotlinJsCompile] | A task is created for `main` source set |
| compileTestKotlin2Js | [KotlinJsCompile] | A task is created for `test` source set |
| compile*SourceSetName*Kotlin2Js| [KotlinJsCompile] | A task is created for each additional source set |
Each [KotlinJsCompile] task provides `kotlinOptions` ([KotlinJsOptions]) extension:
```
compileKotlinJs {
kotlinOptions {
noStdlib = true
}
// kotlinOptions.noStdlib = true
}
```
@@ -125,15 +125,6 @@ tasks {
enableStricterValidation.set(true)
}
withType<DokkaTask>().configureEach {
dokkaSourceSets.configureEach {
includes.from("Module.md")
}
}
register("dokka") {
dependsOn(named("dokkaJavadoc"))
}
withType<ShadowJar>().configureEach {
relocate("com.github.gundy", "$kotlinEmbeddableRootPackage.com.github.gundy")
relocate("de.undercouch.gradle.tasks.download", "$kotlinEmbeddableRootPackage.de.undercouch.gradle.tasks.download")