Skip to content

Commit 97612d5

Browse files
committed
Merge branch '3.2.x'
2 parents b28ed2f + d2f7442 commit 97612d5

File tree

1 file changed

+20
-0
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin

1 file changed

+20
-0
lines changed

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/build.gradle

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import org.gradle.plugins.ide.eclipse.EclipsePlugin
2+
import org.gradle.plugins.ide.eclipse.model.Classpath
3+
import org.gradle.plugins.ide.eclipse.model.Library
4+
15
plugins {
26
id "java-gradle-plugin"
37
id "maven-publish"
@@ -138,3 +142,19 @@ artifacts {
138142
toolchain {
139143
maximumCompatibleJavaVersion = JavaLanguageVersion.of(20)
140144
}
145+
146+
plugins.withType(EclipsePlugin) {
147+
eclipse {
148+
classpath.file { merger ->
149+
merger.whenMerged { content ->
150+
if (content instanceof Classpath) {
151+
content.entries.each { entry ->
152+
if (entry instanceof Library && (entry.path.contains("gradle-api-") || entry.path.contains("groovy-"))) {
153+
entry.entryAttributes.remove("test")
154+
}
155+
}
156+
}
157+
}
158+
}
159+
}
160+
}

0 commit comments

Comments
 (0)