diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2019-04-16 09:22:50 +0200 |
---|---|---|
committer | Kamil Doległo <kamilok1965@interia.pl> | 2019-04-16 09:22:50 +0200 |
commit | 5c1253503c62d2401cfec9cb5c2d89f45b74ef63 (patch) | |
tree | bdfc331100052ce13609899e1c7d99eab57b16ee /runners/gradle-plugin/src/main/kotlin | |
parent | 4f87f295e4df6da40854ebd47158829c4622f945 (diff) | |
download | dokka-5c1253503c62d2401cfec9cb5c2d89f45b74ef63.tar.gz dokka-5c1253503c62d2401cfec9cb5c2d89f45b74ef63.tar.bz2 dokka-5c1253503c62d2401cfec9cb5c2d89f45b74ef63.zip |
Fix Gradle extensions
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin')
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt | 14 |
1 files changed, 7 insertions, 7 deletions
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<GradlePassConfigurationImpl>).toList() - } - passConfigurationExtension?.sourceRoots?.addAll(sourceRoots) + + passConfigurationExtension.sourceRoots.addAll(sourceRoots) val passConfigurationList = - (passConfigurationExtension?.let { listOf(it) } ?: passConfigurationsContainer) + (passConfigurationsContainer + passConfigurationExtension) .map { defaultPassConfiguration(it) } val configuration = GradleDokkaConfigurationImpl() |