Eclipse dependencies for different configuration


I have a dependency in my project that I only need during the run / compiletime of my integration tests. These integration tests are included in my project.
My dependencies section looks something like this:

dependencies {  
  compile ( ...),
  integTestCompile (

Now, when I run these tests everything works as expected. However, when I generate my eclipse source and project files it seems that the dependency to “someProject” is ommitted which leaves me with compile errors in eclipse.
So, to solve that I also have to add “someProject” as a dependency in “compile” or “providedCompile” to make it be recognized by eclipse.
Which seems wrong to me.

Any ideas how to solve that?


I would imagine that this occurs because the eclipse plugin only includes dependencies from pre-defined configurations (compile, test etc.).

The best way of solving it would be to somehow tell the eclipse plugin to include that configuration as well, although from the docs I don’t see any way of doing it.

Alternatively you’ll have to manually cycle through the configuration dependencies and add entries to the eclipse model - see


I have not found any other solution either and added it to the .classpath file via withXml.