Skip to content

Commit 3ccd515

Browse files
authored
Fix test fixture dependencies in eclipse (#63979) (#64010)
- Fix test fixture dependencies in eclipse - explain issue inline
1 parent 7d05c2c commit 3ccd515

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

build.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import org.gradle.plugins.ide.eclipse.model.SourceFolder
3131
import org.gradle.util.DistributionLocator
3232
import org.gradle.util.GradleVersion
3333
import static org.elasticsearch.gradle.util.GradleUtils.maybeConfigure
34+
import org.gradle.plugins.ide.eclipse.model.ProjectDependency
3435

3536
plugins {
3637
id 'lifecycle-base'
@@ -338,6 +339,17 @@ allprojects {
338339
i++;
339340
folder.output = "build-eclipse/" + i
340341
}
342+
343+
// Starting with Gradle 6.7 test dependencies are not exposed by eclipse
344+
// projects by default. This breaks project dependencies using the `java-test-fixtures` plugin
345+
// or dependencies on other projects manually declared testArtifacts configurations
346+
// This issue is tracked in gradle issue tracker.
347+
// See https://github.com/gradle/gradle/issues/14932 for further details
348+
classpath.entries.findAll {
349+
it instanceof ProjectDependency
350+
}.each {
351+
it.entryAttributes.remove('without_test_code')
352+
}
341353
}
342354
}
343355
/*

0 commit comments

Comments
 (0)