aboutsummaryrefslogtreecommitdiff
path: root/build-logic/build.gradle.kts
diff options
context:
space:
mode:
authorGoooler <wangzongler@gmail.com>2023-03-13 21:51:31 +0800
committerGitHub <noreply@github.com>2023-03-13 14:51:31 +0100
commit3ea414251d32108dab8b14d41a672e9834824690 (patch)
tree5f7a62f60e3d90ee97989cff8e5d748b180d091b /build-logic/build.gradle.kts
parent7a46cd329ac6ccbdb10195310197289947ee4104 (diff)
downloaddokka-3ea414251d32108dab8b14d41a672e9834824690.tar.gz
dokka-3ea414251d32108dab8b14d41a672e9834824690.tar.bz2
dokka-3ea414251d32108dab8b14d41a672e9834824690.zip
Migrate buildSrc to composite build (#2912)
Diffstat (limited to 'build-logic/build.gradle.kts')
-rw-r--r--build-logic/build.gradle.kts31
1 files changed, 31 insertions, 0 deletions
diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts
new file mode 100644
index 00000000..0c054c5c
--- /dev/null
+++ b/build-logic/build.gradle.kts
@@ -0,0 +1,31 @@
+import java.util.*
+
+plugins {
+ `kotlin-dsl`
+}
+
+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 {
+ // 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")
+}