diff options
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt | 22 |
1 files changed, 12 insertions, 10 deletions
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 5bf76880..d70448f1 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 @@ -33,16 +33,18 @@ open class DokkaPlugin : Plugin<Project> { configuration() } - val multimoduleName = "${name}Multimodule" - project.maybeCreateDokkaPluginConfiguration(multimoduleName) - project.maybeCreateDokkaRuntimeConfiguration(multimoduleName) - project.tasks.register<DokkaMultimoduleTask>(multimoduleName) { - dokkaTaskNames = dokkaTaskNames + name - configuration() - } - - project.tasks.register<DokkaCollectorTask>("${name}Collector") { - dokkaTaskNames = dokkaTaskNames + name + if (project.subprojects.isNotEmpty()) { + val multimoduleName = "${name}Multimodule" + project.maybeCreateDokkaPluginConfiguration(multimoduleName) + project.maybeCreateDokkaRuntimeConfiguration(multimoduleName) + project.tasks.register<DokkaMultimoduleTask>(multimoduleName) { + dokkaTaskNames = dokkaTaskNames + name + configuration() + } + + project.tasks.register<DokkaCollectorTask>("${name}Collector") { + dokkaTaskNames = dokkaTaskNames + name + } } } } |