From f06b1890ed28ae543692a77010abc89dec6a08e5 Mon Sep 17 00:00:00 2001 From: Sergey Igushkin Date: Wed, 12 Jun 2024 17:54:56 +0400 Subject: [PATCH] (FIXME: REVERT THIS!) Remove gradle-api from the runtime classpath This is a workaround against class ambiguity: the dependency on the plugins from an included build brings the Gradle API JAR on the classpath. That has SLF4J bundled, which clashes with the one used in this project. Revert this commit once we switch to a dependency on published plugins. --- gradle-client/build.gradle.kts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gradle-client/build.gradle.kts b/gradle-client/build.gradle.kts index ce1e56e..bf42f36 100644 --- a/gradle-client/build.gradle.kts +++ b/gradle-client/build.gradle.kts @@ -21,7 +21,17 @@ val appQualifiedName = "org.gradle.client" val appUUID = file("app-uuid.txt").readText().trim() kotlin { - jvm() + jvm { + compilations.named("main") { + tasks.withType().all { + if (name == "jvmRun") { + setClasspath(runtimeDependencyFiles.filter { + !it.name.startsWith("gradle-api-") + }) + } + } + } + } sourceSets { all {