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

NX dependency graph not working with gradle project #27160

Closed
1 of 4 tasks
spetrov opened this issue Jul 26, 2024 · 1 comment · Fixed by #27488
Closed
1 of 4 tasks

NX dependency graph not working with gradle project #27160

spetrov opened this issue Jul 26, 2024 · 1 comment · Fixed by #27488
Assignees
Labels
outdated scope: java Issues related to Java and Gradle type: bug

Comments

@spetrov
Copy link

spetrov commented Jul 26, 2024

Current Behavior

./nx graph does not detect direct dependency in android gradle project, showing a "flat" graph instead - e.g:
image

Expected Behavior

NX should detect the dependencies in the gradle project and display them.
For example the example project from the docs detects correctly the dependencies:
image

GitHub Repo

https://github.com/spetrov/nx-android

Steps to Reproduce

  1. Create a simple Android project
  2. Add a new android library module to the project
  3. Make the app depend on the library - i.e. the app's build.gradle add in the dependencies implementation(project(":mylibrary"))
  4. Follow the steps in https://nx.dev/nx-api/gradle to add nx to the workspace - npx nx@latest init
  5. Run ./nx graph

Nx Report

Node   : 20.15.0
OS     : darwin-arm64
npm    : 10.8.1

nx          : 19.5.3
@nx/devkit  : 19.5.3
@nx/gradle  : 19.5.3
@nrwl/tao   : 19.5.3
---------------------------------------
Registered Plugins:
@nx/gradle

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@FrozenPandaz FrozenPandaz added the scope: java Issues related to Java and Gradle label Aug 2, 2024
FrozenPandaz pushed a commit that referenced this issue Aug 21, 2024
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #27160

(cherry picked from commit 7c45589)
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: java Issues related to Java and Gradle type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants