diff options
Diffstat (limited to 'runners/gradle-plugin/src/main')
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt index e05b2075..b534dcc4 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt @@ -55,8 +55,10 @@ private fun KotlinCompilation.classpathOf(project: Project): FileCollection { val shouldKeepBackwardsCompatibility = (kgpVersion != null && kgpVersion < KotlinGradlePluginVersion(1, 7, 0)) return if (shouldKeepBackwardsCompatibility) { - @Suppress("DEPRECATION_ERROR") - kotlinCompile.classpath // deprecated with error since 1.8.0, left for compatibility with < Kotlin 1.7 + // removed since 1.9.0, left for compatibility with < Kotlin 1.7 + val classpathGetter= kotlinCompile::class.members + .first { it.name == "getClasspath" } + classpathGetter.call(kotlinCompile) as FileCollection } else { kotlinCompile.libraries // introduced in 1.7.0 } |