diff options
4 files changed, 104 insertions, 13 deletions
diff --git a/docs/src/doc/docs/user_guide/cli/usage.md b/docs/src/doc/docs/user_guide/cli/usage.md index 6b96fb01..9bfcb6fb 100644 --- a/docs/src/doc/docs/user_guide/cli/usage.md +++ b/docs/src/doc/docs/user_guide/cli/usage.md @@ -61,11 +61,96 @@ For Base plugins these are: * [dokka-analysis.jar](https://mvnrepository.com/artifact/org.jetbrains.dokka/dokka-analysis) * [kotlin-analysis-compiler.jar](https://mvnrepository.com/artifact/org.jetbrains.dokka/kotlin-analysis-compiler) * [kotlin-analysis-intellij.jar](https://mvnrepository.com/artifact/org.jetbrains.dokka/kotlin-analysis-intellij) -* [kotlinx-coroutines-core.jar](https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.3.9) * [kotlinx-html-jvm.jar](https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-html-jvm?repo=kotlinx) -All of them are published on maven central. +All of them are published on maven central. Another dependencies of Base plugin (e.g. `kotlinx-coroutines-core` and so on) are already included in `dokka-cli.jar`. To get them on classpath one should add them via `pluginsClasspath` argument, e. g. ``` -java -jar dokka-cli.jar -pluginsClasspath "dokka-base.jar;dokka-analysis.jar;kotlin-analysis-compiler.jar;kotlin-analysis-intellij.jar;kotlinx-coroutines-core.jar;kotlinx-html-jvm.jar" ... +java -jar dokka-cli.jar -pluginsClasspath "dokka-base.jar;dokka-analysis.jar;kotlin-analysis-compiler.jar;kotlin-analysis-intellij.jar;kotlinx-html-jvm.jar" ... ``` + +## Example using JSON + +To run Dokka with JSON configuration: +``` +java -jar dokka-cli.jar dokkaConfiguration.json +``` +Option values of JSON correspond to [Gradle ones](../../gradle/usage#configuration-options). +The content of JSON file ```dokkaConfiguration.json```: +```json +{ + "moduleName": "Dokka Example", + "moduleVersion": null, + "outputDir": "build/dokka/html", + "cacheRoot": null, + "offlineMode": false, + "sourceSets": [ + { + "displayName": "jvm", + "sourceSetID": { + "scopeId": ":dokkaHtml", + "sourceSetName": "main" + }, + "classpath": [ + "libs/kotlin-stdlib-1.6.0.jar", + "libs/kotlin-stdlib-common-1.6.0.jar" + ], + "sourceRoots": [ + "/home/Vadim.Mishenev/dokka/examples/cli/src/main/kotlin" + ], + "dependentSourceSets": [], + "samples": [], + "includes": [ + "Module.md" + ], + "includeNonPublic": false, + "reportUndocumented": false, + "skipEmptyPackages": true, + "skipDeprecated": false, + "jdkVersion": 8, + "sourceLinks": [ + { + "localDirectory": "/home/Vadim.Mishenev/dokka/examples/cli/src/main/kotlin", + "remoteUrl": "https://github.com/Kotlin/dokka/tree/master/examples/gradle/dokka-gradle-example/src/main/kotlin", + "remoteLineSuffix": "#L" + } + ], + "perPackageOptions": [], + "externalDocumentationLinks": [ + { + "url": "https://docs.oracle.com/javase/8/docs/api/", + "packageListUrl": "https://docs.oracle.com/javase/8/docs/api/package-list" + }, + { + "url": "https://kotlinlang.org/api/latest/jvm/stdlib/", + "packageListUrl": "https://kotlinlang.org/api/latest/jvm/stdlib/package-list" + } + ], + "noStdlibLink": false, + "noJdkLink": false, + "suppressedFiles": [], + "analysisPlatform": "jvm" + } + ], + "pluginsClasspath": [ + "plugins/dokka-base-1.6.0.jar", + "libs/kotlinx-html-jvm-0.7.3.jar", + "libs/dokka-analysis-1.6.0.jar", + "libs/kotlin-analysis-intellij-1.6.0.jar", + "libs/kotlin-analysis-compiler-1.6.0.jar" + ], + "pluginsConfiguration": [ + { + "fqPluginName": "org.jetbrains.dokka.base.DokkaBase", + "serializationFormat": "JSON", + "values": "{\"separateInheritedMembers\":false,\"footerMessage\":\"© 2021 Copyright\"}" + } + ], + "modules": [], + "failOnWarning": false, + "delayTemplateSubstitution": false, + "suppressObviousFunctions": true, + "includes": [], + "suppressInheritedMembers": false +} +```
\ No newline at end of file diff --git a/examples/gradle/dokka-versioning-multimodule-example/build.gradle.kts b/examples/gradle/dokka-versioning-multimodule-example/build.gradle.kts index f95b65b5..ec77db84 100644 --- a/examples/gradle/dokka-versioning-multimodule-example/build.gradle.kts +++ b/examples/gradle/dokka-versioning-multimodule-example/build.gradle.kts @@ -5,12 +5,15 @@ plugins { // The versioning plugin should be applied in all submodules subprojects { + repositories { + mavenCentral() + } apply { plugin("org.jetbrains.kotlin.jvm") plugin("org.jetbrains.dokka") } val dokkaPlugin by configurations dependencies { - dokkaPlugin("org.jetbrains.dokka:versioning-plugin:1.6.0") + dokkaPlugin("org.jetbrains.dokka:versioning-plugin:1.6.0") } } diff --git a/integration-tests/gradle/projects/stdlib/stdlib.diff b/integration-tests/gradle/projects/stdlib/stdlib.diff index afb77fc9..c009e788 100644 --- a/integration-tests/gradle/projects/stdlib/stdlib.diff +++ b/integration-tests/gradle/projects/stdlib/stdlib.diff @@ -43,7 +43,7 @@ index aa8f21b..dd6a2ae 100644 plugins { - id "de.undercouch.download" version "3.4.3" - id 'com.github.jk1.tcdeps' version '0.17' -+ id "de.undercouch.download" version "3.4.3" ++ id "de.undercouch.download" version "4.1.2" + id 'com.github.jk1.tcdeps' version '0.17' + id "java" + id "org.jetbrains.dokka" @@ -542,7 +542,7 @@ diff --git a/settings.gradle b/settings.gradle index 5209245..bd38b18 100644 --- a/settings.gradle +++ b/settings.gradle -@@ -1,5 +1,21 @@ +@@ -1,5 +1,18 @@ +pluginManagement { + resolutionStrategy { + eachPlugin { @@ -553,9 +553,6 @@ index 5209245..bd38b18 100644 + } + repositories { + mavenLocal() -+ maven { -+ url "https://dl.bintray.com/kotlin/kotlin-dev" -+ } + gradlePluginPortal() + } +} diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt index b33351ac..1b581355 100644 --- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt +++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt @@ -442,12 +442,18 @@ open class DefaultPageCreator( kind = ContentKind.Comment, styles = this@group.mainStyles, ) { - if (it.address != null) link( + it.address?.let { dri -> + link( + it.name, + dri, + kind = ContentKind.Comment, + styles = mainStyles + ContentStyle.RowTitle + ) + } ?: text( it.name, - it.address!!, - kind = ContentKind.Comment + kind = ContentKind.Comment, + styles = mainStyles + ContentStyle.RowTitle ) - else text(it.name, kind = ContentKind.Comment) comment(it.root) } } |