From 7f29c3f18a72e6379c8a0be4befcf50718008273 Mon Sep 17 00:00:00 2001 From: Yang Date: Sat, 28 Oct 2023 15:48:30 +1100 Subject: [PATCH] Fix toolchain. --- gradle/libs.versions.toml | 1 + settings.gradle.kts | 31 ++++++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 345386d..b7f1a28 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,6 +11,7 @@ kotlinx-serialization = "1.5.1" detekt = "1.23.1" apacheCommonsText = "1.10.0" caffeine = "3.1.8" +toolchainsResolver = "0.7.0" [plugins] kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } diff --git a/settings.gradle.kts b/settings.gradle.kts index 8f26670..7b91621 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -2,7 +2,36 @@ rootProject.name = "kstreamlined-backend" pluginManagement { repositories { + gradlePluginPortal { + content { + includeGroupByRegex("org.gradle.*") + includeGroupByRegex("com.google.cloud.tools.*") + includeGroup("com.netflix.dgs.codegen") + } + } mavenCentral() - gradlePluginPortal() } + + val toolchainsResolverVersion = file("$rootDir/gradle/libs.versions.toml") + .readLines() + .first { it.contains("toolchainsResolver") } + .substringAfter("=") + .trim() + .removeSurrounding("\"") + + plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version toolchainsResolverVersion + } +} + +@Suppress("UnstableApiUsage") +dependencyResolutionManagement { + repositories { + mavenCentral() + google() + } +} + +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") }