Skip to content

fix(gradle): strip single quotes from project names in composite build dependency report - #36859

Open
romain-petit-whoz wants to merge 2 commits into
nrwl:masterfrom
romain-petit-whoz:master
Open

fix(gradle): strip single quotes from project names in composite build dependency report#36859
romain-petit-whoz wants to merge 2 commits into
nrwl:masterfrom
romain-petit-whoz:master

Conversation

@romain-petit-whoz

Copy link
Copy Markdown

Current Behavior

When using @nx/gradle/plugin-v1 with Gradle composite builds (includeBuild),
createDependencies always returns an empty array. No inter-project static dependencies
appear in graph.dependencies — every Gradle project only has its implicit conf dependency.

As a result, filterAffected cannot propagate changes through the Gradle dependency graph.
Modifying a file in a leaf project (e.g. commons) never marks dependent projects
(e.g. app, service) as affected.

Root cause: processGradleDependencies parses lines of the form:

+--- io.test.project:app -> project ':app'

and stores "':app'" (with surrounding single quotes) in gradleProjectToDepsMap.
But gradleProjectNameToProjectRootMap is keyed without quotes: ":app".

The lookup silently returns undefined — no error, no warning — and the dependency is dropped.

Note: the existing composite build test mock used -> project :my-utils:number-utils
(no quotes), which is why this case was not caught by existing tests.

Expected Behavior

Inter-project Gradle dependencies from composite builds appear as static edges in
graph.dependencies, allowing filterAffected to correctly propagate changes through
the Gradle dependency graph.

Related Issue(s)

Fixes #36858

@romain-petit-whoz
romain-petit-whoz requested a review from a team as a code owner August 31, 2026 13:47
@netlify

netlify Bot commented Aug 31, 2026

Copy link
Copy Markdown

👷 Deploy request for nx-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 902798e

@netlify

netlify Bot commented Aug 31, 2026

Copy link
Copy Markdown

👷 Deploy request for nx-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 902798e

@romain-petit-whoz romain-petit-whoz changed the title fix(gradle): strip single quotes from project names in composite buil dependency report fix(gradle): strip single quotes from project names in composite build dependency report Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[gradle/plugin-v1] createDependencies silently produces no edges for composite builds — single-quoted project names cause lookup failure

2 participants