diff --git a/.github/workflows/githubpages.yaml b/.github/workflows/githubpages.yaml index be75c8a6949..adab39fe376 100644 --- a/.github/workflows/githubpages.yaml +++ b/.github/workflows/githubpages.yaml @@ -29,7 +29,7 @@ jobs: cache-read-only: ${{ github.ref != 'refs/heads/main' }} - name: assemble - run: ./gradlew -Pversion=${{ github.event.release.tag_name }} dokkaHtmlMultiModule -Pgithubpages=true --max-workers 1 + run: ./gradlew -Pversion=${{ github.event.release.tag_name }} :dokkaGenerate -Pgithubpages=true - name: Deploy to gh-pages uses: peaceiris/actions-gh-pages@v4 diff --git a/arrow-libs/core/arrow-annotations/build.gradle.kts b/arrow-libs/core/arrow-annotations/build.gradle.kts index 1b9e385f48d..acacd800ceb 100644 --- a/arrow-libs/core/arrow-annotations/build.gradle.kts +++ b/arrow-libs/core/arrow-annotations/build.gradle.kts @@ -9,6 +9,7 @@ plugins { alias(libs.plugins.arrowGradleConfig.kotlin) alias(libs.plugins.publish) alias(libs.plugins.spotless) + alias(libs.plugins.dokka) } spotless { diff --git a/arrow-libs/core/arrow-atomic/build.gradle.kts b/arrow-libs/core/arrow-atomic/build.gradle.kts index 24c46d57792..2ed417786a0 100644 --- a/arrow-libs/core/arrow-atomic/build.gradle.kts +++ b/arrow-libs/core/arrow-atomic/build.gradle.kts @@ -10,6 +10,7 @@ plugins { alias(libs.plugins.publish) alias(libs.plugins.kotlinx.kover) alias(libs.plugins.spotless) + alias(libs.plugins.dokka) } spotless { diff --git a/arrow-libs/core/arrow-autoclose/build.gradle.kts b/arrow-libs/core/arrow-autoclose/build.gradle.kts index d99a1f878bb..7df416f16e7 100644 --- a/arrow-libs/core/arrow-autoclose/build.gradle.kts +++ b/arrow-libs/core/arrow-autoclose/build.gradle.kts @@ -10,6 +10,7 @@ plugins { alias(libs.plugins.arrowGradleConfig.kotlin) alias(libs.plugins.publish) alias(libs.plugins.spotless) + alias(libs.plugins.dokka) } spotless { diff --git a/arrow-libs/core/arrow-cache4k/build.gradle.kts b/arrow-libs/core/arrow-cache4k/build.gradle.kts index e83cdc90aa5..113830029f2 100644 --- a/arrow-libs/core/arrow-cache4k/build.gradle.kts +++ b/arrow-libs/core/arrow-cache4k/build.gradle.kts @@ -10,6 +10,7 @@ plugins { id(libs.plugins.kotlin.multiplatform.get().pluginId) alias(libs.plugins.publish) alias(libs.plugins.spotless) + alias(libs.plugins.dokka) } apply(from = property("ANIMALSNIFFER_MPP")) diff --git a/arrow-libs/core/arrow-core-high-arity/build.gradle.kts b/arrow-libs/core/arrow-core-high-arity/build.gradle.kts index a6d64bbe79f..102f708064e 100644 --- a/arrow-libs/core/arrow-core-high-arity/build.gradle.kts +++ b/arrow-libs/core/arrow-core-high-arity/build.gradle.kts @@ -10,6 +10,7 @@ plugins { alias(libs.plugins.publish) alias(libs.plugins.kotlinx.kover) alias(libs.plugins.spotless) + alias(libs.plugins.dokka) } spotless { diff --git a/arrow-libs/core/arrow-core-retrofit/build.gradle.kts b/arrow-libs/core/arrow-core-retrofit/build.gradle.kts index 27346d0ab9a..ace23bd4949 100644 --- a/arrow-libs/core/arrow-core-retrofit/build.gradle.kts +++ b/arrow-libs/core/arrow-core-retrofit/build.gradle.kts @@ -11,6 +11,7 @@ plugins { alias(libs.plugins.kotlinx.serialization) // Needed for testing only alias(libs.plugins.kotlinx.kover) alias(libs.plugins.spotless) + alias(libs.plugins.dokka) } spotless { diff --git a/arrow-libs/core/arrow-core-serialization/build.gradle.kts b/arrow-libs/core/arrow-core-serialization/build.gradle.kts index aadc1dfd6b1..51aade60491 100644 --- a/arrow-libs/core/arrow-core-serialization/build.gradle.kts +++ b/arrow-libs/core/arrow-core-serialization/build.gradle.kts @@ -10,6 +10,7 @@ plugins { alias(libs.plugins.publish) alias(libs.plugins.kotlinx.kover) alias(libs.plugins.spotless) + alias(libs.plugins.dokka) id(libs.plugins.kotlinx.serialization.get().pluginId) } diff --git a/arrow-libs/core/arrow-core/build.gradle.kts b/arrow-libs/core/arrow-core/build.gradle.kts index 308d0932623..844c9e33ea5 100644 --- a/arrow-libs/core/arrow-core/build.gradle.kts +++ b/arrow-libs/core/arrow-core/build.gradle.kts @@ -11,6 +11,7 @@ plugins { alias(libs.plugins.publish) alias(libs.plugins.kotlinx.kover) alias(libs.plugins.spotless) + alias(libs.plugins.dokka) } spotless { diff --git a/arrow-libs/core/arrow-eval/build.gradle.kts b/arrow-libs/core/arrow-eval/build.gradle.kts index ee0313aed2d..ed14ceb25e8 100644 --- a/arrow-libs/core/arrow-eval/build.gradle.kts +++ b/arrow-libs/core/arrow-eval/build.gradle.kts @@ -10,6 +10,7 @@ plugins { alias(libs.plugins.publish) alias(libs.plugins.kotlinx.kover) alias(libs.plugins.spotless) + alias(libs.plugins.dokka) } spotless { diff --git a/arrow-libs/core/arrow-functions/build.gradle.kts b/arrow-libs/core/arrow-functions/build.gradle.kts index b9914abb255..9fe53d91046 100644 --- a/arrow-libs/core/arrow-functions/build.gradle.kts +++ b/arrow-libs/core/arrow-functions/build.gradle.kts @@ -10,6 +10,7 @@ plugins { alias(libs.plugins.publish) alias(libs.plugins.kotlinx.kover) alias(libs.plugins.spotless) + alias(libs.plugins.dokka) } spotless { diff --git a/arrow-libs/core/arrow-platform/build.gradle.kts b/arrow-libs/core/arrow-platform/build.gradle.kts index e863afadf7b..e20744c592a 100644 --- a/arrow-libs/core/arrow-platform/build.gradle.kts +++ b/arrow-libs/core/arrow-platform/build.gradle.kts @@ -9,6 +9,7 @@ plugins { alias(libs.plugins.arrowGradleConfig.kotlin) alias(libs.plugins.publish) alias(libs.plugins.spotless) + alias(libs.plugins.dokka) } spotless { diff --git a/arrow-libs/fx/arrow-collectors/build.gradle.kts b/arrow-libs/fx/arrow-collectors/build.gradle.kts index cd714dfd748..cd193a68826 100644 --- a/arrow-libs/fx/arrow-collectors/build.gradle.kts +++ b/arrow-libs/fx/arrow-collectors/build.gradle.kts @@ -10,6 +10,7 @@ plugins { alias(libs.plugins.publish) alias(libs.plugins.spotless) alias(libs.plugins.kotlinx.kover) + alias(libs.plugins.dokka) } apply(from = property("ANIMALSNIFFER_MPP")) diff --git a/arrow-libs/fx/arrow-fx-coroutines/build.gradle.kts b/arrow-libs/fx/arrow-fx-coroutines/build.gradle.kts index dc909f0efc5..034993836b0 100644 --- a/arrow-libs/fx/arrow-fx-coroutines/build.gradle.kts +++ b/arrow-libs/fx/arrow-fx-coroutines/build.gradle.kts @@ -11,6 +11,7 @@ plugins { alias(libs.plugins.publish) alias(libs.plugins.kotlinx.kover) alias(libs.plugins.spotless) + alias(libs.plugins.dokka) } spotless { diff --git a/arrow-libs/fx/arrow-fx-stm/build.gradle.kts b/arrow-libs/fx/arrow-fx-stm/build.gradle.kts index 6cc4466bf75..de813971830 100644 --- a/arrow-libs/fx/arrow-fx-stm/build.gradle.kts +++ b/arrow-libs/fx/arrow-fx-stm/build.gradle.kts @@ -10,6 +10,7 @@ plugins { alias(libs.plugins.publish) alias(libs.plugins.kotlinx.kover) alias(libs.plugins.spotless) + alias(libs.plugins.dokka) } spotless { diff --git a/arrow-libs/optics/arrow-optics-compose/build.gradle.kts b/arrow-libs/optics/arrow-optics-compose/build.gradle.kts index 826a86f661c..9adba2a6a04 100644 --- a/arrow-libs/optics/arrow-optics-compose/build.gradle.kts +++ b/arrow-libs/optics/arrow-optics-compose/build.gradle.kts @@ -17,6 +17,7 @@ plugins { alias(libs.plugins.compose.jetbrains) alias(libs.plugins.compose.compiler) alias(libs.plugins.android.library) + alias(libs.plugins.dokka) } apply(from = property("ANIMALSNIFFER_MPP")) diff --git a/arrow-libs/optics/arrow-optics-reflect/build.gradle.kts b/arrow-libs/optics/arrow-optics-reflect/build.gradle.kts index 6f57cda752f..5b22bdbf3a0 100644 --- a/arrow-libs/optics/arrow-optics-reflect/build.gradle.kts +++ b/arrow-libs/optics/arrow-optics-reflect/build.gradle.kts @@ -10,6 +10,7 @@ plugins { alias(libs.plugins.publish) alias(libs.plugins.kotlinx.kover) alias(libs.plugins.spotless) + alias(libs.plugins.dokka) } spotless { diff --git a/arrow-libs/optics/arrow-optics/build.gradle.kts b/arrow-libs/optics/arrow-optics/build.gradle.kts index eb419c1654c..2c0cbc11d93 100644 --- a/arrow-libs/optics/arrow-optics/build.gradle.kts +++ b/arrow-libs/optics/arrow-optics/build.gradle.kts @@ -10,6 +10,7 @@ plugins { alias(libs.plugins.publish) alias(libs.plugins.kotlinx.kover) alias(libs.plugins.spotless) + alias(libs.plugins.dokka) } spotless { diff --git a/arrow-libs/resilience/arrow-resilience/build.gradle.kts b/arrow-libs/resilience/arrow-resilience/build.gradle.kts index 0df872e9388..5e9807ed372 100644 --- a/arrow-libs/resilience/arrow-resilience/build.gradle.kts +++ b/arrow-libs/resilience/arrow-resilience/build.gradle.kts @@ -10,6 +10,7 @@ plugins { alias(libs.plugins.publish) alias(libs.plugins.kotlinx.kover) alias(libs.plugins.spotless) + alias(libs.plugins.dokka) } spotless { diff --git a/build.gradle.kts b/build.gradle.kts index de73f797c26..5ab030ae911 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,6 +2,8 @@ import kotlinx.knit.KnitPluginExtension import kotlinx.validation.ExperimentalBCVApi +import org.jetbrains.dokka.base.DokkaBase +import org.jetbrains.dokka.base.DokkaBaseConfiguration import org.jetbrains.dokka.gradle.DokkaMultiModuleTask import org.jetbrains.dokka.gradle.DokkaTaskPartial import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi @@ -89,6 +91,28 @@ allprojects { group = property("projects.group").toString() } +dependencies { + dokka(projects.arrowAnnotations) + dokka(projects.arrowAtomic) + dokka(projects.arrowAutoclose) + dokka(projects.arrowCore) + dokka(projects.arrowCoreHighArity) + dokka(projects.arrowCoreRetrofit) + dokka(projects.arrowCoreSerialization) + dokka(projects.arrowCache4k) + dokka(projects.arrowEval) + dokka(projects.arrowFunctions) + dokka(projects.arrowPlatform) + dokka(projects.arrowFxCoroutines) + dokka(projects.arrowFxStm) + dokka(projects.arrowCollectors) + dokka(projects.arrowOptics) + dokka(projects.arrowOpticsReflect) + dokka(projects.arrowOpticsCompose) + dokka(projects.arrowResilience) +} + + private val kotlinXUpstream = setOf( "arrow-fx-coroutines", @@ -114,7 +138,7 @@ subprojects { kotlinSourceSet.kotlin.srcDirs.filter { it.exists() }.forEach { srcDir -> sourceLink { localDirectory.set(srcDir) -remoteUrl.set(uri("https://github.com/arrow-kt/arrow/blob/main/${srcDir.relativeTo(rootProject.rootDir)}").toURL()) + remoteUrl.set(uri("https://github.com/arrow-kt/arrow/blob/main/${srcDir.relativeTo(rootProject.rootDir)}").toURL()) remoteLineSuffix.set("#L") } } @@ -123,26 +147,27 @@ remoteUrl.set(uri("https://github.com/arrow-kt/arrow/blob/main/${srcDir.relative } } -tasks { - val undocumentedProjects = - listOf(project(":arrow-optics-ksp-plugin")) - - val copyCNameFile = register("copyCNameFile") { - from(layout.projectDirectory.dir("static").file("CNAME")) - into(layout.projectDirectory.dir("docs")) +dokka { + dokkaPublications.html { + outputDirectory.set(layout.projectDirectory.dir("docs")) } - - dokkaHtmlMultiModule { - dependsOn(copyCNameFile) - removeChildTasks(undocumentedProjects) + moduleName.set("Arrow") + pluginsConfiguration.html { + customAssets.from("static/img/logo/logo-icon.svg") } +} - getByName("knitPrepare").dependsOn(getTasksByName("dokka", true)) +val copyCNameFile = tasks.register("copyCNameFile") { + from(layout.projectDirectory.dir("static").file("CNAME")) + into(layout.projectDirectory.dir("docs")) +} - withType().configureEach { - outputDirectory.set(file("docs")) - moduleName.set("Arrow") - } +tasks.dokkaGenerate { + dependsOn(copyCNameFile) +} + +tasks.getByName("knitPrepare") { + dependsOn(tasks.dokkaGenerate, true) } apiValidation { diff --git a/gradle.properties b/gradle.properties index ac7d7e95354..ee2fb0de271 100644 --- a/gradle.properties +++ b/gradle.properties @@ -32,6 +32,10 @@ systemProp.org.gradle.internal.publish.checksums.insecure=true kotlin.stdlib.default.dependency=false kotlin.mpp.applyDefaultHierarchyTemplate=false +org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled +org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true +org.jetbrains.dokka.experimental.tryK2=true + ANIMALSNIFFER=../../gradle/animalsniffer.gradle ANIMALSNIFFER_MPP=../../gradle/animalsniffer-mpp.gradle diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2bd179f74bf..191d9f44e8e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,7 @@ animalSniffer = "1.7.2" arrowGradleConfig = "0.12.0-rc.24" coroutines = "1.9.0" classgraph = "4.8.179" -dokka = "1.9.20" +dokka = "2.0.0" kotest = "6.0.0.M1" kover = "0.8.3" kotlin = "2.1.0" diff --git a/static/img/logo/logo-icon.svg b/static/img/logo/logo-icon.svg new file mode 100644 index 00000000000..85f7b2f77a7 --- /dev/null +++ b/static/img/logo/logo-icon.svg @@ -0,0 +1,6 @@ + + + + + +