From 732ffcc09816ceb5eb60377adfb07d43fa160554 Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Thu, 28 Nov 2019 16:20:32 +0100 Subject: Provide an error message when no pass config is present Fixes https://github.com/Kotlin/dokka/issues/511 --- .../src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt index 16f6c83e..97deb100 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt @@ -8,7 +8,6 @@ import org.gradle.api.internal.plugins.DslObject import org.gradle.api.plugins.JavaBasePlugin import org.gradle.api.tasks.* import org.jetbrains.dokka.DokkaBootstrap -import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.DokkaConfiguration.ExternalDocumentationLink.Builder import org.jetbrains.dokka.DokkaConfiguration.SourceRoot import org.jetbrains.dokka.Platform @@ -166,6 +165,11 @@ open class DokkaTask : DefaultTask() { configuration.impliedPlatforms = impliedPlatforms configuration.passesConfigurations = passConfigurationList + if(passConfigurationList.isEmpty() || passConfigurationList == listOf(globalConfig)) { + println("No pass configurations for generation detected!") + return + } + bootstrapProxy.configure( BiConsumer { level, message -> when (level) { -- cgit