Skip to content

Gradle project view keeps project hierarchy#1612

Merged
jdneo merged 3 commits intomicrosoft:developfrom
jjohannes:945-project-hierarchy
Oct 8, 2024
Merged

Gradle project view keeps project hierarchy#1612
jdneo merged 3 commits intomicrosoft:developfrom
jjohannes:945-project-hierarchy

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 #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
@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

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