From c8a83153a88fe6f5b50b6f459295421f90a21583 Mon Sep 17 00:00:00 2001 From: Paweł Marks Date: Wed, 16 Sep 2020 16:36:54 +0200 Subject: Extracting dokka generation to the dedicated extension point --- .../src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt | 1 + .../src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt | 3 ++- .../gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'runners/gradle-plugin/src/main/kotlin/org') diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt index 90d51015..726dd950 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt @@ -9,6 +9,7 @@ internal class DokkaArtifacts(private val project: Project) { private fun fromModuleName(name: String) = project.dependencies.create("org.jetbrains.dokka:$name:${DokkaVersion.version}") + val allModulesPage get() = fromModuleName("all-modules-page-plugin") val dokkaCore get() = fromModuleName("dokka-core") val dokkaBase get() = fromModuleName("dokka-base") val javadocPlugin get() = fromModuleName("javadoc-plugin") diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt index 03e0b4d7..74f17215 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt @@ -3,6 +3,7 @@ package org.jetbrains.dokka.gradle import org.gradle.api.internal.tasks.TaskDependencyInternal import org.gradle.api.provider.Property import org.gradle.api.tasks.* +import org.jetbrains.dokka.DokkaBootstrapImpl import org.jetbrains.dokka.DokkaConfigurationImpl import org.jetbrains.dokka.DokkaModuleDescriptionImpl import org.jetbrains.dokka.DokkaMultimoduleBootstrapImpl @@ -15,7 +16,7 @@ typealias DokkaMultimoduleTask = DokkaMultiModuleTask private typealias TaskPath = String -abstract class DokkaMultiModuleTask : AbstractDokkaParentTask(DokkaMultimoduleBootstrapImpl::class) { +abstract class DokkaMultiModuleTask : AbstractDokkaParentTask(DokkaBootstrapImpl::class) { @Internal val fileLayout: Property = project.objects.safeProperty() diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt index f5dc9366..1cda5c39 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt @@ -57,6 +57,7 @@ open class DokkaPlugin : Plugin { addSubprojectChildTasks(name) configuration() description = "Runs all subprojects '$name' tasks and generates module navigation page" + plugins.dependencies.add(project.dokkaArtifacts.allModulesPage) } project.tasks.register("${name}Multimodule") { -- cgit