From 5cd6cf394b364884fb445c3cde27799cc9398b5d Mon Sep 17 00:00:00 2001 From: Giovanni Ciatto Date: Wed, 8 Mar 2023 18:15:27 +0100 Subject: [PATCH] fix: broken plugin variant selection on windows --- buildSrc/build.gradle.kts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 1a7babe..8eb8211 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -9,10 +9,22 @@ repositories { gradlePluginPortal() } -kotlin { - jvmToolchain(11) +// https://github.com/gradle/gradle/issues/20847 +configurations.configureEach { + if (isCanBeResolved) { + attributes { + attribute( + GradlePluginApiVersion.GRADLE_PLUGIN_API_VERSION_ATTRIBUTE, + project.objects.named(GradleVersion.current().version) + ) + } + } } +//kotlin { +// jvmToolchain(11) +//} + dependencies { implementation(libs.kotlin.bom) implementation(libs.kotlin.gradlePlugin)