Eclipse plugin creates bad project files for subprojects

lets say I have 3 projects: 1 root project and 2 subprojects in a directory structure like this: projekt1/intermediateFolder/project2 projekt1/intermediateFolder/project3

project3 depends on project project2 and the settings.gradle file in project1 looks like this: include ‘intermediateFolder/project2’, ‘intermediateFolder/project3’

in this case the eclipse plugin does not generate correct eclipse files for project3 because the depency path to project2 is not correct.

if I instead put include ‘intermediateFolder:project2’, ‘intermediateFolder:project3’ in the settings.gradle file then the eclipse project files are generated correctly but gradle thinks that intermediateFolder is also a project whis is not the case.

Have you tried setting the projectDirs in your settings.gradle?

for example:

include 'project2'
include 'project3'
  project(":project2").projectDir = file('intermediateFolder/project2/')
project(":project3").projectDir = file('intermediateFolder/project3/')

Note that you can write code in your settings.gradle too, for example iterating over all subprojects and setting the projectDir instead of writing all out like i did in the example.

thanks, that worked perfectly!