diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2021-03-26 17:35:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-26 17:35:44 +0100 |
commit | 9589161d9861a1d2eb02df1c5858b3ff67ca0c7a (patch) | |
tree | 308e7d2bcd682e08812e6b68fc182eb276475562 /runners/gradle-plugin/src/main/kotlin | |
parent | ac4b818a8616e4de8f702167fe6ddbe911df5d24 (diff) | |
download | dokka-9589161d9861a1d2eb02df1c5858b3ff67ca0c7a.tar.gz dokka-9589161d9861a1d2eb02df1c5858b3ff67ca0c7a.tar.bz2 dokka-9589161d9861a1d2eb02df1c5858b3ff67ca0c7a.zip |
Reintroduce multimodule documentation (#1804)
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin')
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt | 1 | ||||
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt | 14 |
2 files changed, 8 insertions, 7 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt index d2506f7a..6c1e6ab6 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt @@ -19,7 +19,6 @@ import org.jetbrains.dokka.plugability.ConfigurableBlock import org.jetbrains.dokka.plugability.DokkaPlugin import java.io.File import java.util.function.BiConsumer -import kotlin.reflect.KClass import kotlin.reflect.full.createInstance abstract class AbstractDokkaTask : DefaultTask() { diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt index c68b53b8..b0683204 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt @@ -1,11 +1,9 @@ package org.jetbrains.dokka.gradle +import org.gradle.api.file.ConfigurableFileCollection import org.gradle.api.internal.tasks.TaskDependencyInternal import org.gradle.api.provider.Property -import org.gradle.api.tasks.Input -import org.gradle.api.tasks.InputFiles -import org.gradle.api.tasks.Internal -import org.gradle.api.tasks.OutputDirectories +import org.gradle.api.tasks.* import org.jetbrains.dokka.DokkaConfigurationImpl import org.jetbrains.dokka.DokkaModuleDescriptionImpl import java.io.File @@ -17,6 +15,9 @@ typealias DokkaMultimoduleTask = DokkaMultiModuleTask private typealias TaskPath = String abstract class DokkaMultiModuleTask : AbstractDokkaParentTask() { + @InputFiles + @Optional + val includes: ConfigurableFileCollection = project.files() @Internal val fileLayout: Property<DokkaMultiModuleFileLayout> = project.objects.safeProperty<DokkaMultiModuleFileLayout>() @@ -32,7 +33,7 @@ abstract class DokkaMultiModuleTask : AbstractDokkaParentTask() { @get:Input internal val childDokkaTaskIncludes: Map<TaskPath, Set<File>> - get() = childDokkaTasks.filterIsInstance<DokkaTask>().associate { task -> + get() = childDokkaTasks.filterIsInstance<DokkaTaskPartial>().associate { task -> task.path to task.dokkaSourceSets.flatMap { it.includes }.toSet() } @@ -61,7 +62,8 @@ abstract class DokkaMultiModuleTask : AbstractDokkaParentTask() { includes = childDokkaTaskIncludes[dokkaTask.path].orEmpty(), sourceOutputDirectory = dokkaTask.outputDirectory.getSafe() ) - } + }, + includes = includes.toSet(), ) } |