Gradle plugin obfuscates project directory

Hi there,

I am working on a Gradle project for the first time since the new UI was unleashed upon the world, and am currently fighting a bizarre quirk of the new Gradle integration.

This project (not written by me, I am merely attempting to contribute to it), has the Gradle project in a sub-directory under the main repository root. When I import the Gradle project, something decides it would be a good idea to entire obfuscate any / all files above that sub-directory.

It forcibly moves my view away from the actual root of the repo (which is the directory I actually opened, and where I actually want to be…), into a new bizarre view that pretends the sub-directory containing the Gradle project is the actual root repository directory.

This is absolutely infuriating. I can no longer see or edit our helm chart config, our github config, anything in a sibling directory to the gradle project’s sub-directory. Bizarrely, I can see files in the root directory but they are marked as “ignored” for some reason and come with all the annoyances that entails.

I cannot find an easy way to say “import gradle project in-place without futzing with my project directory view”.

How do I do this? How do I get it to import a gradle project without annihilating the project view?

Hi, is it a public project?
This seems to be a Grade problem, but we need more details.
I can only say that the intellij platform plugin does not apply any obfuscation.

Unfortunately no, it is not a public project.

The directory structure is as such:

.
|-.github/
|-helm/
|-gradle/project/
|               |-gradle/
|               |-module1/
|               |-module2/
|               |-other project files
|-.gitignore
|-.gitmodules
|-README.md
|-other root files and directories

When I first open the project, it shows the root directory . with all child files & directories just fine. As soon as I load the Gradle project, it turns the left-side project view into this:

.
|-gradle-project-name/
|                    |-gradle/
|                    |-module1/
|                    |-module2/
|                    |-other project files
|-.gitignore (now marked as ignored
|-.gitmodules (now marked as ignored)
|-README.md (now marked as ignored)
|-other root files only (and marked as ignored)

I can view everything if I go select Project Files from the drop down above the left-hand bar, but it still marks everything as “ignored” and all that entails.

How do I disable / modify this behavior?

Its also bizarrely hiding files & directories under the gradle/project/* path, including preventing changed files from appearing in the git commit list.

Utterly strange. I’ve had to just disable gradle integration entirely to get it to make any kind of sense.