From 213808f60933b33b164512a2aad817f366f39aa4 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 11 Apr 2021 12:15:07 +0100 Subject: [PATCH] Add pluginManagement block This allows us to remove the buildSrc module. Signed-off-by: Graham --- build.gradle.kts | 12 +++++------- buildSrc/build.gradle.kts | 7 ------- buildSrc/settings.gradle.kts | 1 - buildSrc/src/main/kotlin/Versions.kt | 8 -------- settings.gradle.kts | 11 +++++++++++ 5 files changed, 16 insertions(+), 23 deletions(-) delete mode 100644 buildSrc/build.gradle.kts delete mode 100644 buildSrc/settings.gradle.kts delete mode 100644 buildSrc/src/main/kotlin/Versions.kt diff --git a/build.gradle.kts b/build.gradle.kts index cc03e419..0583abd7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,13 +10,11 @@ defaultTasks("build") plugins { base - id("com.github.ben-manes.versions") version Versions.versionsPlugin - id("org.jetbrains.dokka") version Versions.dokka - kotlin("jvm") version Versions.kotlin + id("com.github.ben-manes.versions") + id("org.jetbrains.dokka") + kotlin("jvm") - id("com.github.jk1.dependency-license-report") version Versions.dependencyLicenseReport apply false - id("com.github.johnrengelman.shadow") version Versions.shadowPlugin apply false - id("org.jmailen.kotlinter") version Versions.kotlinter apply false + id("org.jmailen.kotlinter") apply false } allprojects { @@ -112,7 +110,7 @@ configure(subprojects.filter { it.isFree }) { for (module in listOf("stdlib", "stdlib-common", "stdlib-jdk7", "stdlib-jdk8")) { api("org.jetbrains.kotlin:kotlin-$module") { version { - strictly(Versions.kotlin) + strictly(kotlinPluginVersion) } } } diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts deleted file mode 100644 index 1a373372..00000000 --- a/buildSrc/build.gradle.kts +++ /dev/null @@ -1,7 +0,0 @@ -plugins { - `embedded-kotlin` -} - -repositories { - mavenCentral() -} diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts deleted file mode 100644 index 8b137891..00000000 --- a/buildSrc/settings.gradle.kts +++ /dev/null @@ -1 +0,0 @@ - diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt deleted file mode 100644 index b6d57be9..00000000 --- a/buildSrc/src/main/kotlin/Versions.kt +++ /dev/null @@ -1,8 +0,0 @@ -object Versions { - const val dependencyLicenseReport = "1.16" - const val dokka = "1.4.30" - const val kotlin = "1.4.32" - const val kotlinter = "3.4.0" - const val shadowPlugin = "6.1.0" - const val versionsPlugin = "0.38.0" -} diff --git a/settings.gradle.kts b/settings.gradle.kts index bdd7d4f6..753d07f9 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -10,6 +10,17 @@ dependencyResolutionManagement { } } +pluginManagement { + plugins { + id("com.github.ben-manes.versions") version "0.38.0" + id("com.github.jk1.dependency-license-report") version "1.16" + id("com.github.johnrengelman.shadow") version "6.1.0" + id("org.jetbrains.dokka") version "1.4.30" + id("org.jmailen.kotlinter") version "3.4.0" + kotlin("jvm") version "1.4.32" + } +} + enableFeaturePreview("VERSION_CATALOGS") include(