diff options
author | sebastian.sellmair <sebastian.sellmair@jetbrains.com> | 2020-07-13 09:50:18 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-07-13 14:23:08 +0200 |
commit | 8ec106388209543434f990fe3af6fb02a7caceb4 (patch) | |
tree | 710340b47fde53ae4681024678ba3a5054ced440 /runners/gradle-plugin/src/main | |
parent | ec8cb8223f20e4c953f6b39e611842eabab81c3b (diff) | |
download | dokka-8ec106388209543434f990fe3af6fb02a7caceb4.tar.gz dokka-8ec106388209543434f990fe3af6fb02a7caceb4.tar.bz2 dokka-8ec106388209543434f990fe3af6fb02a7caceb4.zip |
Implement DokkaTasksTest
Diffstat (limited to 'runners/gradle-plugin/src/main')
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt | 2 | ||||
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt | 9 |
2 files changed, 1 insertions, 10 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt index dc94cc7f..27d25884 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt @@ -23,7 +23,7 @@ open class DokkaCollectorTask : DefaultTask() { @TaskAction fun collect() { - val configurations = project.allDescendentProjects().toList() + val configurations = project.subprojects .filter { subProject -> subProject.name in modules } .flatMap { subProject -> dokkaTaskNames.mapNotNull(subProject.tasks::findByName) } .filterIsInstance<DokkaTask>() diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt index 3a7bcd0d..b6c5cbd8 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt @@ -32,15 +32,6 @@ internal fun Project.isMultiplatformProject() = try { internal fun KotlinTarget.isAndroidTarget() = this.platformType == KotlinPlatformType.androidJvm -internal fun Project.allDescendentProjects(): Sequence<Project> { - return sequence { - yieldAll(subprojects) - subprojects.forEach { subproject -> - yieldAll(subproject.allDescendentProjects()) - } - } -} - internal fun <T : Any> NamedDomainObjectContainer<T>.maybeCreate(name: String, configuration: T.() -> Unit): T { return findByName(name) ?: create(name, configuration) } |