Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle project view keeps project hierarchy #1612

Merged
merged 3 commits into from
Oct 8, 2024

Conversation

jjohannes
Copy link
Contributor

Implements #945 by parsing the project path which is found in the definition.script property. The project path, which is unique for every subproject, is then used as key in the projectTreeItemMap.

Implements microsoft#945 by parsing the project path which is found in the
'definition.script' property. The project path, which is unique for
every subproject, is then used as key in the 'projectTreeItemMap'.
@jjohannes
Copy link
Contributor Author

@microsoft-github-policy-service agree

@jdneo
Copy link
Member

jdneo commented Oct 8, 2024

Thank you @jjohannes.

I'm just back from vacation and will review this contribution ASAP.

@jdneo jdneo added this to the 3.16.5 milestone Oct 8, 2024
@jdneo jdneo added the enhancement New feature or request label Oct 8, 2024
@jdneo jdneo merged commit 9ac3ffe into microsoft:develop Oct 8, 2024
8 checks passed
@jjohannes
Copy link
Contributor Author

Thank you for the quick response and integrating this @jdneo.

@jjohannes jjohannes deleted the 945-project-hierarchy branch October 8, 2024 05:23
@jdneo
Copy link
Member

jdneo commented Oct 9, 2024

I found an issue about this change that some of the modules are in the wrong place:

image

For example, here: the app and mylibrary should belong to android-test.

Clone and open the project https://github.com/microsoft/build-server-for-gradle can reproduce the error

jjohannes added a commit to jjohannes/vscode-gradle that referenced this pull request Oct 14, 2024
In microsoft#1612, the keys of this map were changed to the Gradle project path.
This path is unique for each project within one Gradle build, but not
if there are multiple Gradle builds loaded in one workspace by using:
'gradle.nestedProjects': true

This change combined the old and new behavior by creating the Map key
from two parts:
(1) The root project folder which uniquely identifies the build
    (accessible via definition.projectFolder)
(2) The Gradle project path that uniquely identifies a project inside
    the build
jjohannes added a commit to jjohannes/vscode-gradle that referenced this pull request Oct 14, 2024
In microsoft#1612, the keys of this map were changed to the Gradle project path.
This path is unique for each project within one Gradle build, but not
if there are multiple Gradle builds loaded in one workspace by using:
'gradle.nestedProjects': true

This change combined the old and new behavior by creating the Map key
from two parts:
(1) The root project folder which uniquely identifies the build
    (accessible via definition.projectFolder)
(2) The Gradle project path that uniquely identifies a project inside
    the build

Signed-off-by: Jendrik Johannes <jendrik.johannes@gmail.com>
jdneo pushed a commit that referenced this pull request Oct 16, 2024
In #1612, the keys of this map were changed to the Gradle project path.
This path is unique for each project within one Gradle build, but not
if there are multiple Gradle builds loaded in one workspace by using:
'gradle.nestedProjects': true

This change combined the old and new behavior by creating the Map key
from two parts:
(1) The root project folder which uniquely identifies the build
    (accessible via definition.projectFolder)
(2) The Gradle project path that uniquely identifies a project inside
    the build

Signed-off-by: Jendrik Johannes <jendrik.johannes@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants