From fdf5eda3d22ef96f6760cdf80c2ca4d206dc396c Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Fri, 9 Jul 2021 16:37:24 +0200 Subject: Add gradle version check (#2006) --- .../gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runners/gradle-plugin') diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt index 41b29cdc..8e306e4c 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt @@ -5,9 +5,13 @@ import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.artifacts.Dependency import org.gradle.kotlin.dsl.register +import org.gradle.util.GradleVersion open class DokkaPlugin : Plugin { override fun apply(project: Project) { + if (GradleVersion.version(project.gradle.gradleVersion) < GradleVersion.version("5.6")) { + project.logger.warn("Dokka: Build is using unsupported gradle version, expected at least 5.6 but got ${project.gradle.gradleVersion}. This may result in strange errors") + } project.setupDokkaTasks("dokkaHtml") { description = "Generates documentation in 'html' format" -- cgit