Add @SkipWhenEmpty and @IgnoreEmptyDirectories for better incremental…#1670
Merged
Add @SkipWhenEmpty and @IgnoreEmptyDirectories for better incremental…#1670
Conversation
… builds. Improve incremental build performance by adding skip annotations to tasks that should skip execution when inputs are empty: - PlantumlTask: Override getSource() with @SkipWhenEmpty to skip when no PlantUML source files exist - GenerateCodeTask: Add @SkipWhenEmpty and @IgnoreEmptyDirectories to inputDir - DescriptorGeneratorTask: Add @SkipWhenEmpty to source and classes directories - MkDocsBuild/MkDocsServe: Add @IgnoreEmptyDirectories to themeDir, add @PathSensitive for MkDocsServe consistency These annotations allow Gradle to skip task execution when inputs are empty, improving build performance and enabling better build cache usage.
Keep both the @SkipWhenEmpty/@IgnoreEmptyDirectories annotations from this PR and the @PathSensitive/@classpath annotations added on main. Both serve different purposes and are complementary.
Member
Author
|
Automated maintenance: Resolved merge conflicts with Conflicts were in:
Both sets of annotations serve complementary purposes and are non-conflicting. CI should re-run automatically. This PR is ready for manual review. |
- MkDocsServe: resolve conflict by keeping both @IgnoreEmptyDirectories and @PathSensitive annotations - DescriptorGeneratorTask: remove @SkipWhenEmpty from getClassesDirectories() to prevent incorrect task skipping when only one input is empty - PlantumlTask: add @IgnoreEmptyDirectories to getSource() for consistent cache key behavior on this @CacheableTask
Member
Author
|
Automated maintenance summary:
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
… builds.
Improve incremental build performance by adding skip annotations to tasks that should skip execution when inputs are empty:
These annotations allow Gradle to skip task execution when inputs are empty, improving build performance and enabling better build cache usage.