aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src/main/kotlin/org/jetbrains
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-07-13 13:35:16 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-07-13 14:23:08 +0200
commitf8f376ca9a95eb414dfa5428ac636611dcbbea39 (patch)
tree4faa2439ccfe037975c4f6c02f4f86aca7400bdf /runners/gradle-plugin/src/main/kotlin/org/jetbrains
parent9f822143aca6ecf6daba8dd757f85bd56a150dbe (diff)
downloaddokka-f8f376ca9a95eb414dfa5428ac636611dcbbea39.tar.gz
dokka-f8f376ca9a95eb414dfa5428ac636611dcbbea39.tar.bz2
dokka-f8f376ca9a95eb414dfa5428ac636611dcbbea39.zip
Use `dokkaSourceSets.create` for fallback "main" source set creation
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin/org/jetbrains')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt3
1 files changed, 2 insertions, 1 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 6d1e827c..c5077bb8 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,6 +8,7 @@ import org.gradle.api.file.FileCollection
import org.gradle.api.internal.plugins.DslObject
import org.gradle.api.plugins.JavaBasePlugin
import org.gradle.api.tasks.*
+import org.gradle.kotlin.dsl.getValue
import org.jetbrains.dokka.DokkaConfiguration.ExternalDocumentationLink.Builder
import org.jetbrains.dokka.DokkaConfiguration.SourceRoot
import org.jetbrains.dokka.DokkaException
@@ -147,7 +148,7 @@ open class DokkaTask : AbstractDokkaTask() {
val defaultModulesConfiguration = configuredDokkaSourceSets
.map { configureDefault(it) }.takeIf { it.isNotEmpty() }
?: listOf(
- configureDefault(configureDokkaSourceSet(GradleDokkaSourceSet("main", project)))
+ configureDefault(configureDokkaSourceSet(dokkaSourceSets.create("main")))
).takeIf { project.isNotMultiplatformProject() } ?: emptyList()
if (defaultModulesConfiguration.isEmpty()) {