classpath.plusConfigurations defaults

I am using Buildship 1.0.20, Gradle 3.1, and Eclipse 4.6.

I noticed that my runtime dependencies are not being used in Eclipse when doing “run as Java application”. Instead it appears to only use the testCompile / testRuntime dependencies.

Here is what I get when I print eclipse.classpath.plusConfigurations:

[configuration ':testRuntime', configuration ':compileClasspath', configuration ':testCompileClasspath']

I get the same result from a new project created with gradle init --type java-library, so this does not appear to be specific to my project.

In the Buildship FAQ it says that plusConfigurations by default includes compileOnly, runtime, testCompileOnly and testRuntime. This appears to be inconsistent with the actual values.

Which one is correct?

They are equal. If you check the hierarchy of configurations from the Java plugin, you can see that the three configuration you listed cover all configurations from the FAQ.

That is only true if you are not doing explicit exclusions. For instance we are excluding some runtime dependencies from testRuntime because they are not used in tests; such dependencies are not reflected in the Eclipse classpath despite the claim in the FAQ that runtime is specifically included.

@amake could you open an enhancement request for that?

Thanks. Done: