diff options
author | Błażej Kardyś <bkardys@virtuslab.com> | 2020-11-13 22:05:15 +0100 |
---|---|---|
committer | Błażej Kardyś <bkardys@virtuslab.com> | 2020-11-27 03:15:02 +0100 |
commit | c203be9fb65ee221875b4e1c865bcd289a85e69c (patch) | |
tree | 40384c13d98f722dbb7c819f8ebadb6caac01651 /runners/gradle-plugin/src/main/kotlin/org/jetbrains | |
parent | 4639cbda50359c8dcbaa61f0a960c002c060d3b9 (diff) | |
download | dokka-c203be9fb65ee221875b4e1c865bcd289a85e69c.tar.gz dokka-c203be9fb65ee221875b4e1c865bcd289a85e69c.tar.bz2 dokka-c203be9fb65ee221875b4e1c865bcd289a85e69c.zip |
Adding multimodule all modules page creation for gfm
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin/org/jetbrains')
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaArtifacts.kt | 1 | ||||
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt | 8 |
2 files changed, 6 insertions, 3 deletions
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 726dd950..cca1b3f8 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 @@ -14,5 +14,6 @@ internal class DokkaArtifacts(private val project: Project) { val dokkaBase get() = fromModuleName("dokka-base") val javadocPlugin get() = fromModuleName("javadoc-plugin") val gfmPlugin get() = fromModuleName("gfm-plugin") + val gfmAllModulesPagePlugin get() = fromModuleName("gfm-all-module-page-plugin") val jekyllPlugin get() = fromModuleName("jekyll-plugin") } 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 99e6e7e3..3c89100e 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 @@ -3,6 +3,7 @@ package org.jetbrains.dokka.gradle import org.gradle.api.DefaultTask import org.gradle.api.Plugin import org.gradle.api.Project +import org.gradle.api.artifacts.Dependency import org.gradle.kotlin.dsl.register open class DokkaPlugin : Plugin<Project> { @@ -20,12 +21,12 @@ open class DokkaPlugin : Plugin<Project> { description = "Generates documentation in 'javadoc' format" } - project.setupDokkaTasks("dokkaGfm") { + project.setupDokkaTasks("dokkaGfm", allModulesPage = project.dokkaArtifacts.gfmAllModulesPagePlugin) { plugins.dependencies.add(project.dokkaArtifacts.gfmPlugin) description = "Generates documentation in GitHub flavored markdown format" } - project.setupDokkaTasks("dokkaJekyll") { + project.setupDokkaTasks("dokkaJekyll", allModulesPage = project.dokkaArtifacts.gfmAllModulesPagePlugin) { plugins.dependencies.add(project.dokkaArtifacts.jekyllPlugin) description = "Generates documentation in Jekyll flavored markdown format" } @@ -38,6 +39,7 @@ open class DokkaPlugin : Plugin<Project> { private fun Project.setupDokkaTasks( name: String, multiModuleTaskSupported: Boolean = true, + allModulesPage: Dependency = project.dokkaArtifacts.allModulesPage, collectorTaskSupported: Boolean = true, configuration: AbstractDokkaTask.() -> Unit = {} ) { @@ -63,7 +65,7 @@ open class DokkaPlugin : Plugin<Project> { addSubprojectChildTasks("${name}Partial") configuration() description = "Runs all subprojects '$name' tasks and generates module navigation page" - plugins.dependencies.add(project.dokkaArtifacts.allModulesPage) + plugins.dependencies.add(allModulesPage) } project.tasks.register<DefaultTask>("${name}Multimodule") { |