Skip to content

Commit

Permalink
bump Dokka & dependencies (#126)
Browse files Browse the repository at this point in the history
- bump Kotest
- bump KxS
- Update README
- dogfood Dokkatoo Snapshot version
  • Loading branch information
aSemy authored Dec 2, 2023
1 parent 019cf93 commit f9546e6
Show file tree
Hide file tree
Showing 85 changed files with 390 additions and 122 deletions.
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![GitHub license](https://img.shields.io/github/license/adamko-dev/dokkatoo?style=for-the-badge)](https://github.com/adamko-dev/dokkatoo/blob/main/LICENSE)
[![Gradle Plugin Portal](https://img.shields.io/gradle-plugin-portal/v/dev.adamko.dokkatoo?style=for-the-badge&logo=gradle)](https://plugins.gradle.org/search?term=dokkatoo)
[![Maven Central](https://img.shields.io/maven-central/v/dev.adamko.dokkatoo/dokkatoo-plugin?style=for-the-badge&logo=apache-maven&color=6545e7&link=https%3A%2F%2Fsearch.maven.org%2Fsearch%3Fq%3Dg%3Adev.adamko.dokkatoo)](https://search.maven.org/search?q=g:dev.adamko.dokkatoo)
[![Maven metadata URL](https://img.shields.io/maven-metadata/v?label=MAVEN%20SNAPSHOT&metadataUrl=https%3A%2F%2Fs01.oss.sonatype.org%2Fcontent%2Frepositories%2Fsnapshots%2Fdev%2Fadamko%2Fdokkatoo%2Fdokkatoo-plugin%2Fmaven-metadata.xml&style=for-the-badge&logo=apache-maven)](https://s01.oss.sonatype.org/content/repositories/snapshots/dev/adamko/dokkatoo/dokkatoo-plugin/)
[![Maven Central Snapshots](https://img.shields.io/maven-metadata/v?label=MAVEN%20SNAPSHOT&metadataUrl=https%3A%2F%2Fs01.oss.sonatype.org%2Fcontent%2Frepositories%2Fsnapshots%2Fdev%2Fadamko%2Fdokkatoo%2Fdokkatoo-plugin%2Fmaven-metadata.xml&style=for-the-badge&logo=apache-maven)](https://s01.oss.sonatype.org/content/repositories/snapshots/dev/adamko/dokkatoo/dokkatoo-plugin/)
[![Slack](https://img.shields.io/badge/slack-%23dokka-white.svg?&style=for-the-badge&logo=slack)](https://slack-chats.kotlinlang.org/c/dokka)

<picture>
Expand All @@ -14,6 +14,7 @@ for your Kotlin projects.
Under the hood it uses [Dokka](https://github.com/Kotlin/dokka/),
the API documentation engine for Kotlin.


###### Why Dokkatoo?

If
Expand All @@ -28,20 +29,24 @@ Dokkatoo has a number of improvements over the existing Dokka Gradle Plugin:
* Safe cross-project sharing and aggregation
* Parallel execution


### Status

Dokkatoo has basic functionality, and can generate documentation for single-projects and
multimodule projects.
Dokkatoo is used in production by many projects, and can generate documentation for single-module
and multimodule projects.

[Dokkatoo has been merged into the Dokka codebase](https://github.com/Kotlin/dokka/pull/3188),
although as of December 2023 it has not been released.
Until JetBrains releases a version of Dokkatoo, continue to use this version and
[watch this space](https://github.com/Kotlin/dokka/issues/3131).

Be aware that many things are untested, broken, and undocumented. Please
[create an issue](https://github.com/adamko-dev/dokkatoo/issues)
if something is not as you'd expect, or like.

## Usage

Dokkatoo is published on
the [Gradle Plugin Portal](https://plugins.gradle.org/search?term=dokkatoo).


### Quick start

1. Apply the appropriate plugin for any formats you'd like to generate.
Expand Down Expand Up @@ -77,6 +82,7 @@ the [Gradle Plugin Portal](https://plugins.gradle.org/search?term=dokkatoo).

3. View the results in `./build/dokka/`


#### Configuring Dokkatoo

Once the Dokkatoo plugin is applied to a project, it can be configuring using the `dokkatoo {}` DSL.
Expand Down Expand Up @@ -128,6 +134,7 @@ dokkatoo {
}
```


#### Combining subprojects

Dokkatoo can aggregate documentation from subprojects.
Expand Down Expand Up @@ -169,13 +176,15 @@ Dokkatoo will then generate documentation into `./build/dokka/`
To improve performance only run the task in the aggregating project by prefixing the task name with
the subproject path (or `:` if aggregating in the root project).


### Migrating from Dokka Gradle Plugin

Dokkatoo is not a drop-in replacement for the Dokka Gradle Plugin, and requires migration.

When Dokkatoo matures, a guide will be made available. For now, check the
[example projects](./examples#readme) for comparative examples.


###### Apply both Dokka Gradle Plugin and Dokkatoo

For help in migrating from the Dokka Gradle Plugin to Dokkatoo, you can still apply both plugins -
Expand All @@ -197,7 +206,8 @@ dokkatoo {

### Snapshot releases

Snapshot versions of Dokkatoo are available on Maven Central.
Snapshot versions of Dokkatoo are available on
[Maven Central](https://s01.oss.sonatype.org/content/repositories/snapshots/dev/adamko/dokkatoo/dokkatoo-plugin/).

```kts
// settings.gradle.kts
Expand All @@ -207,7 +217,7 @@ pluginManagement {
gradlePluginPortal()
mavenCentral()

// add the Dokkatoo snapshot repository
// add Maven Central snapshot repository
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") {
name = "MavenCentralSnapshots"
mavenContent { snapshotsOnly() }
Expand Down
4 changes: 4 additions & 0 deletions buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ dependencyResolutionManagement {

repositories {
mavenCentral()
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") {
name = "MavenCentralSnapshots"
mavenContent { snapshotsOnly() }
}
gradlePluginPortal()
}

Expand Down
10 changes: 7 additions & 3 deletions examples/custom-format-example/dokka/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.DokkaBaseConfiguration

plugins {
kotlin("jvm") version "1.9.0"
id("org.jetbrains.dokka") version "1.9.0"
kotlin("jvm") version "1.9.10"
id("org.jetbrains.dokka") version "1.9.10"
}

buildscript {
dependencies {
classpath("org.jetbrains.dokka:dokka-base:1.9.0")
classpath("org.jetbrains.dokka:dokka-base:1.9.10")
}
}

Expand Down
6 changes: 5 additions & 1 deletion examples/custom-format-example/dokka/logo-styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

/*
* All Margins and sizes are custom for the ktor-logo.png file.
* You may need to override it and find what works best for your case.
Expand All @@ -17,4 +21,4 @@
.library-name--link::before {
background-position: left;
width: 52px;
}
}
4 changes: 4 additions & 0 deletions examples/custom-format-example/dokka/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

rootProject.name = "dokka-customFormat-example"
2 changes: 1 addition & 1 deletion examples/custom-format-example/dokkatoo/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
kotlin("jvm") version "1.9.0"
kotlin("jvm") version "1.9.10"
id("dev.adamko.dokkatoo") version "2.1.0-SNAPSHOT"
}

Expand Down
6 changes: 5 additions & 1 deletion examples/custom-format-example/dokkatoo/logo-styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

/*
* All Margins and sizes are custom for the ktor-logo.png file.
* You may need to override it and find what works best for your case.
Expand All @@ -17,4 +21,4 @@
.library-name--link::before {
background-position: left;
width: 52px;
}
}
8 changes: 6 additions & 2 deletions examples/gradle-example/dokka/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

import org.jetbrains.dokka.gradle.DokkaTask
import java.net.URL

plugins {
kotlin("jvm") version "1.9.0"
id("org.jetbrains.dokka") version "1.9.0"
kotlin("jvm") version "1.9.10"
id("org.jetbrains.dokka") version "1.9.10"
}

repositories {
Expand Down
4 changes: 4 additions & 0 deletions examples/gradle-example/dokka/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

rootProject.name = "dokka-gradle-example"
2 changes: 1 addition & 1 deletion examples/gradle-example/dokkatoo/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
kotlin("jvm") version "1.9.0"
kotlin("jvm") version "1.9.10"
id("dev.adamko.dokkatoo") version "2.1.0-SNAPSHOT"
}

Expand Down
14 changes: 9 additions & 5 deletions examples/kotlin-as-java-example/dokka/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

plugins {
kotlin("jvm") version "1.9.0"
id("org.jetbrains.dokka") version "1.9.0"
kotlin("jvm") version "1.9.10"
id("org.jetbrains.dokka") version "1.9.10"
}

repositories {
Expand All @@ -11,11 +15,11 @@ dependencies {
testImplementation(kotlin("test-junit"))

// Will apply the plugin to all Dokka tasks
dokkaPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.9.0")
dokkaPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.9.10")

// Will apply the plugin only to the `:dokkaHtml` task
//dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.9.0")
//dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.9.10")

// Will apply the plugin only to the `:dokkaGfm` task
//dokkaGfmPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.9.0")
//dokkaGfmPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.9.10")
}
4 changes: 4 additions & 0 deletions examples/kotlin-as-java-example/dokka/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

rootProject.name = "dokka-kotlinAsJava-example"
8 changes: 6 additions & 2 deletions examples/library-publishing-example/dokka/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

plugins {
kotlin("jvm") version "1.9.0"
id("org.jetbrains.dokka") version "1.9.0"
kotlin("jvm") version "1.9.10"
id("org.jetbrains.dokka") version "1.9.10"
`java-library`
`maven-publish`
}
Expand Down
4 changes: 4 additions & 0 deletions examples/library-publishing-example/dokka/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

rootProject.name = "dokka-library-publishing-example"
4 changes: 4 additions & 0 deletions examples/multimodule-example/dokka/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

subprojects {
repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

import org.jetbrains.dokka.DokkaConfiguration.Visibility
import org.jetbrains.dokka.gradle.DokkaTaskPartial
import java.net.URL
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

import org.jetbrains.dokka.gradle.DokkaTaskPartial

plugins {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

import org.jetbrains.dokka.gradle.DokkaTaskPartial

plugins {
Expand Down
4 changes: 4 additions & 0 deletions examples/multimodule-example/dokka/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

pluginManagement {
val kotlinVersion: String by settings
val dokkaVersion: String by settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ plugins {
}

dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10")
implementation("dev.adamko.dokkatoo:dokkatoo-plugin:2.1.0-SNAPSHOT")
}
8 changes: 6 additions & 2 deletions examples/multiplatform-example/dokka/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

@file:Suppress("UNUSED_VARIABLE")

import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.dokka.Platform

plugins {
kotlin("multiplatform") version "1.9.0"
id("org.jetbrains.dokka") version "1.9.0"
kotlin("multiplatform") version "1.9.10"
id("org.jetbrains.dokka") version "1.9.10"
}

repositories {
Expand Down
4 changes: 4 additions & 0 deletions examples/multiplatform-example/dokka/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

rootProject.name = "dokka-multiplatform-example"

2 changes: 1 addition & 1 deletion examples/multiplatform-example/dokkatoo/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
kotlin("multiplatform") version "1.9.0"
kotlin("multiplatform") version "1.9.10"
id("dev.adamko.dokkatoo") version "2.1.0-SNAPSHOT"
}

Expand Down
10 changes: 7 additions & 3 deletions examples/versioning-multimodule-example/dokka/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

plugins {
kotlin("jvm") version "1.9.0"
id("org.jetbrains.dokka") version "1.9.0" apply false
kotlin("jvm") version "1.9.10"
id("org.jetbrains.dokka") version "1.9.10" apply false
}

// The versioning plugin must be applied in all submodules
Expand All @@ -14,6 +18,6 @@ subprojects {
}
val dokkaPlugin by configurations
dependencies {
dokkaPlugin("org.jetbrains.dokka:versioning-plugin:1.9.0")
dokkaPlugin("org.jetbrains.dokka:versioning-plugin:1.9.10")
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
import org.jetbrains.dokka.versioning.VersioningPlugin
import org.jetbrains.dokka.versioning.VersioningConfiguration

buildscript {
dependencies {
classpath("org.jetbrains.dokka:versioning-plugin:1.9.0")
classpath("org.jetbrains.dokka:versioning-plugin:1.9.10")
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

// intentionally empty - build config is set in the root build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

// intentionally empty - build config is set in the root build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

include(":parentProject")
include(":parentProject:childProjectA")
include(":parentProject:childProjectB")

rootProject.name = "dokka-versioning-multimodule-example"
rootProject.name = "dokka-versioning-multimodule-example"
Loading

0 comments on commit f9546e6

Please sign in to comment.