fix(gradle): use globs for dependent task output files#34590
Merged
FrozenPandaz merged 1 commit intomasterfrom Feb 25, 2026
Merged
Conversation
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
View your CI Pipeline Execution ↗ for commit a14b2c8
☁️ Nx Cloud last updated this comment at |
FrozenPandaz
approved these changes
Feb 25, 2026
FrozenPandaz
pushed a commit
that referenced
this pull request
Feb 26, 2026
## Current Behavior When processing Gradle tasks, Nx tracks dependent task output files by recording individual file paths for each output. This can lead to incorrect cache invalidation behavior since we are prefixing the paths unnecessarily. We will therefore never match. ## Expected Behavior Nx now consolidates dependent task output files using glob patterns based on file extensions (e.g., **/*.jar, **/*.class). This focuses on the types of files produced rather than their specific paths. The approach groups all output files by extension and generates a single glob pattern per extension, reducing the complexity of input tracking while maintaining correctness. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #Q-247 (cherry picked from commit 09c44a6)
FrozenPandaz
pushed a commit
that referenced
this pull request
Feb 26, 2026
## Current Behavior When processing Gradle tasks, Nx tracks dependent task output files by recording individual file paths for each output. This can lead to incorrect cache invalidation behavior since we are prefixing the paths unnecessarily. We will therefore never match. ## Expected Behavior Nx now consolidates dependent task output files using glob patterns based on file extensions (e.g., **/*.jar, **/*.class). This focuses on the types of files produced rather than their specific paths. The approach groups all output files by extension and generates a single glob pattern per extension, reducing the complexity of input tracking while maintaining correctness. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #Q-247 (cherry picked from commit 09c44a6)
Contributor
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current Behavior
When processing Gradle tasks, Nx tracks dependent task output files by recording individual file paths for each output. This can lead to incorrect cache invalidation behavior since we are prefixing the paths unnecessarily. We will therefore never match.
Expected Behavior
Nx now consolidates dependent task output files using glob patterns based on file extensions (e.g., **/.jar, **/.class). This focuses on the types of files produced rather than their specific paths. The approach groups all output files by extension and generates a single glob pattern per extension, reducing the complexity of input tracking while maintaining correctness.
Related Issue(s)
Fixes #Q-247