From 4121336ce35ae2502ace12b5b7469fd3dbc5a4ad Mon Sep 17 00:00:00 2001 From: Andrey Tyrin Date: Thu, 19 Jan 2023 13:44:56 +0100 Subject: Fix NoSuchMethodError for Gradle 8.0 RC1 (#2816) --- .../dokka/gradle/TaskDependencyInternalWithAdditions.kt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'runners/gradle-plugin/src/main/kotlin/org/jetbrains') diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt index 559484aa..381cd12a 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/TaskDependencyInternalWithAdditions.kt @@ -1,19 +1,18 @@ package org.jetbrains.dokka.gradle import org.gradle.api.Task -import org.gradle.api.internal.tasks.AbstractTaskDependency +import org.gradle.api.internal.tasks.DefaultTaskDependency import org.gradle.api.internal.tasks.TaskDependencyInternal -import org.gradle.api.internal.tasks.TaskDependencyResolveContext internal operator fun TaskDependencyInternal.plus(tasks: Iterable): TaskDependencyInternal = TaskDependencyInternalWithAdditions(this, tasks.toSet()) private class TaskDependencyInternalWithAdditions( - private val dependency: TaskDependencyInternal, - private val additionalTaskDependencies: Set -) : AbstractTaskDependency() { - override fun visitDependencies(context: TaskDependencyResolveContext) { - dependency.visitDependencies(context) - additionalTaskDependencies.forEach(context::add) + dependency: TaskDependencyInternal, + additionalTaskDependencies: Set, +) : DefaultTaskDependency() { + + init { + add(dependency, additionalTaskDependencies) } } -- cgit