0

I've just been through the ringer trying to get this to work so I thought i would share my experience.

The problem (so I can answer it QA style):

I have a flat project structure where the sub-projects are siblings of the root project:

rootProject
childProject1
childProject2
childProject3

In my rootProject:settings.gradle I used an include:

include '../childProject1', '../childProject2', '../childProject3'

This worked for the simple builds (no real gradle configuration had yet been performed).

Then upon Gradle Import > Build Model the import dialog showed:

[] rootProject

And there were no childProjects.

I did a bit of reading and had the Aha! moment when i re-read the doco and saw I actually want includeFlat. So I changed it to:

includeFlat 'childProject1', 'childProject2', 'childProject3'

However it didn't work. Grumble grumble grumble.

What could I do to fix this?

HankCa
  • 9,129
  • 8
  • 62
  • 83

1 Answers1

0

After a bit of playing around I had to do:

  1. Delete these files from the project's:

    • .project
    • .settings
    • .gradle
  2. Sometimes that wasn't enough and I had to shut down Eclipse / STS and delete the contents of the workspace directory

Then it worked and upon build Model of the RootProject I would see in the import dialog:

[] rootProject
    [] childProject1
    [] childProject2
    [] childProject3

Problem solved.

I've never encountered a situation like this where I had to do lots of eclipse project metadata cleanup to get functionality functioning.

HankCa
  • 9,129
  • 8
  • 62
  • 83