diff options
-rw-r--r-- | docs/src/doc/docs/user_guide/gradle/usage.md | 5 | ||||
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/docs/src/doc/docs/user_guide/gradle/usage.md b/docs/src/doc/docs/user_guide/gradle/usage.md index 05fd3c61..85e7d75f 100644 --- a/docs/src/doc/docs/user_guide/gradle/usage.md +++ b/docs/src/doc/docs/user_guide/gradle/usage.md @@ -4,6 +4,11 @@ If you are upgrading from 0.10.x to a current release of Dokka, please have a look at our [migration guide](https://github.com/Kotlin/dokka/blob/master/runners/gradle-plugin/MIGRATION.md) +### Supported versions +Dokka should work on gradle newer than 5.6 + +### Setup + The preferred way is to use `plugins` block. build.gradle.kts: 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<Project> { 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" |