How to tell gradle not to treat a folder with projects as a project?

My project has the following structure:

my_project
+--- clients
|
  \--- dumb
|
       \--- client
|
           \--- build.gradle
|
       \--- server
|
           \--- build.gradle
 +--- module_one
|
  \--- build.gradle
 +--- module_two
     \--- build.gradle
 +--- build.gradle
\--- settings.gradle

‘gradle projects’ outputs:

Root project 'my_project'
+--- Project ':clients'
|
  \--- Project ':clients:dumb'
|
       +--- Project ':clients:dumb:client'
|
       \--- Project ':clients:dumb:server'
+--- Project ':module_one'
\--- Project ':module_two'

How can I achieve project structure like:

Root project 'my_project'
+--- Project ':clients:dumb:client'
+--- Project ':clients:dumb:server'
+--- Project ':module_one'
\--- Project ':module_two'

Thanks in advance

In your ‘settings.gradle’, don’t do ‘include “clients:dumb:client”’ but ‘include “client”’. Then continue to configure the project directory for that project with ‘project(":client").projectDir = …’.

Thank you very much, Peter. This helps a lot!