From 2fc0016ef13a5f12a8e7564d4f3bbad1f06660f0 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 4 Nov 2024 13:11:45 +0000 Subject: [PATCH] Fix spring-boot-gradle-plugin's tests in Eclipse Closes gh-32625 --- .../spring-boot-loader-tools/build.gradle | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/build.gradle b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/build.gradle index 4ce98c43d6..43fff814ed 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/build.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/build.gradle @@ -100,3 +100,15 @@ compileJava { options.compilerArgs += ['-Xlint:-sunapi', '-XDenableSunApiLintControl'] } } + +plugins.withType(EclipsePlugin) { + eclipse { + classpath.file { merger -> + merger.beforeMerged { content -> + if (content instanceof org.gradle.plugins.ide.eclipse.model.Classpath) { + content.entries.add(new org.gradle.plugins.ide.eclipse.model.SourceFolder("build/generated-resources/main", "bin/main")) + } + } + } + } +}