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

fix(gradle): change gradle command to be relative path #22963

Conversation

xiongemi
Copy link
Collaborator

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #

Copy link

vercel bot commented Apr 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Apr 23, 2024 8:35pm

) {
const gradleBinaryPath = getGradleBinaryPath();
const graldeFile = getGradleFile();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const graldeFile = getGradleFile();
const gradleFile = getGradleFile();

options: {
cwd: projectRoot,
cwd: workspaceRoot,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep projectRoot and get a relative path from projectRoot to gradleFile?

Moving to the workspaceRoot would break the command for nested projects.

@xiongemi xiongemi force-pushed the feature/nxc-592-use-relative-path-for-gradle-command branch 4 times, most recently from 06d0221 to 2333ce3 Compare April 23, 2024 20:24
Comment on lines -37 to -39
if (!existsSync(gradleBinaryPath)) {
throw new Error('Gradle is not setup. Run "gradle init"');
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there was anything wrong this. Can you bring it back please?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this check is a part of getGradleBinaryPath function, which got called before this line. i don't think we need this

packages/gradle/src/utils/get-gradle-report.ts Outdated Show resolved Hide resolved
@xiongemi xiongemi force-pushed the feature/nxc-592-use-relative-path-for-gradle-command branch from 2333ce3 to 00b8df0 Compare April 23, 2024 20:33
@FrozenPandaz FrozenPandaz merged commit 99e5c86 into nrwl:master Apr 23, 2024
6 checks passed
FrozenPandaz pushed a commit that referenced this pull request Apr 25, 2024
Copy link

github-actions bot commented May 1, 2024

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants