From 4aa4e14fa48a7224e7c5f9654874f08b3139c1d3 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 19 Mar 2024 22:24:58 -0700 Subject: [PATCH] Fix buildSrc Eclipse import issues Update `buildSrc` so that it imports cleanly into Eclipse with tests that can run inside the IDE. Fixes gh-40041 --- buildSrc/build.gradle | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index da59f8770d..e0c51fe271 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -65,6 +65,12 @@ dependencies { testRuntimeOnly("org.junit.platform:junit-platform-launcher") } +configurations.all { + exclude group:"org.slf4j", module:"slf4j-api" + exclude group:"ch.qos.logback", module:"logback-classic" + exclude group:"ch.qos.logback", module:"logback-core" +} + gradlePlugin { plugins { annotationProcessorPlugin { @@ -134,8 +140,12 @@ test { useJUnitPlatform() } -eclipse.classpath.file.whenMerged { - def jreEntry = entries.find { it.path.contains("org.eclipse.jdt.launching.JRE_CONTAINER") } - jreEntry.entryAttributes['module'] = 'true' - jreEntry.entryAttributes['limit-modules'] = 'java.base' +eclipse { + jdt { + file { + withProperties { + it["org.eclipse.jdt.core.compiler.ignoreUnnamedModuleForSplitPackage"] = "enabled" + } + } + } }