diff options
author | aSemy <897017+aSemy@users.noreply.github.com> | 2023-03-07 23:26:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-07 23:26:06 +0100 |
commit | 62c980707d23d2d451c75330f7ed1ba613777cf3 (patch) | |
tree | 2dd732bdaa23713d665a07bcc28c2ab152dc8096 /buildSrc/build.gradle.kts | |
parent | ded804e5772399f1495016d598573cb20b673b58 (diff) | |
download | dokka-62c980707d23d2d451c75330f7ed1ba613777cf3.tar.gz dokka-62c980707d23d2d451c75330f7ed1ba613777cf3.tar.bz2 dokka-62c980707d23d2d451c75330f7ed1ba613777cf3.zip |
Use buildSrc convention plugins to configure the Dokka subprojects (#2704)
Diffstat (limited to 'buildSrc/build.gradle.kts')
-rw-r--r-- | buildSrc/build.gradle.kts | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 90ccf158..00733d64 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,13 +1,32 @@ +import java.util.* + plugins { `kotlin-dsl` } -repositories { - gradlePluginPortal() +kotlin { + jvmToolchain { + languageVersion.set(JavaLanguageVersion.of(8)) + } +} + +// TODO define versions in Gradle Version Catalog https://github.com/Kotlin/dokka/pull/2884 +val properties = file("../gradle.properties").inputStream().use { + Properties().apply { load(it) } } +val kotlinVersion = properties["kotlin_version"] + dependencies { - implementation("com.github.jengelman.gradle.plugins:shadow:2.0.4") - implementation("org.jetbrains.kotlinx:binary-compatibility-validator:0.10.1") + // Import Gradle Plugins that will be used in the buildSrc pre-compiled script plugins, and any `build.gradle.kts` + // files in the project. + // Use their Maven coordinates (plus versions), not Gradle plugin IDs! + // This should be the only place that Gradle plugin versions are defined, so they are aligned across all build scripts + + implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") + implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.2") + implementation("org.jetbrains.kotlinx:binary-compatibility-validator:0.12.1") implementation("io.github.gradle-nexus:publish-plugin:1.1.0") + implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.8.10") + implementation("com.gradle.publish:plugin-publish-plugin:0.20.0") } |