From 5c1253503c62d2401cfec9cb5c2d89f45b74ef63 Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Tue, 16 Apr 2019 09:22:50 +0200 Subject: Fix Gradle extensions --- .../main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'runners/gradle-plugin/src/main/kotlin') 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 a49059e5..d9094e46 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 @@ -127,7 +127,7 @@ open class DokkaTask : DefaultTask() { .forEach { throw IllegalArgumentException("Illegal entry in kotlinTasks, must be subtype of $ABSTRACT_KOTLIN_COMPILE or String, but was $it") } tasksByPath - .filter { it == null || it isNotInstance getAbstractKotlinCompileFor(it) } + .filter { it isNotInstance getAbstractKotlinCompileFor(it) } .forEach { throw IllegalArgumentException("Illegal task path in kotlinTasks, must be subtype of $ABSTRACT_KOTLIN_COMPILE, but was $it") } @@ -193,15 +193,15 @@ open class DokkaTask : DefaultTask() { val gson = GsonBuilder().setPrettyPrinting().create() - val passConfigurationExtension: GradlePassConfigurationImpl? = extensions.findByName( - CONFIGURATION_EXTENSION_NAME) as GradlePassConfigurationImpl? - val passConfigurationsContainer by lazy { + val passConfigurationExtension: GradlePassConfigurationImpl = extensions.findByName( + CONFIGURATION_EXTENSION_NAME) as GradlePassConfigurationImpl + val passConfigurationsContainer= (extensions.getByName(MULTIPLATFORM_EXTENSION_NAME) as Iterable).toList() - } - passConfigurationExtension?.sourceRoots?.addAll(sourceRoots) + + passConfigurationExtension.sourceRoots.addAll(sourceRoots) val passConfigurationList = - (passConfigurationExtension?.let { listOf(it) } ?: passConfigurationsContainer) + (passConfigurationsContainer + passConfigurationExtension) .map { defaultPassConfiguration(it) } val configuration = GradleDokkaConfigurationImpl() -- cgit