Skip to content

Conversation

@Goooler
Copy link
Member

@Goooler Goooler commented Aug 8, 2025

Closes #1606.


  • CHANGELOG's "Unreleased" section has been updated, if applicable.

@Goooler Goooler changed the title Support including dirs in includedDependencies Fix the regression of can't shadow directory inputs Aug 8, 2025
@Goooler Goooler requested a review from Copilot August 8, 2025 03:24

This comment was marked as outdated.

@Goooler Goooler force-pushed the g/20250808/cant-use-dirs branch from 592a8b1 to d114594 Compare August 8, 2025 03:25
@Goooler Goooler requested a review from Copilot August 8, 2025 03:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a regression where the shadow plugin couldn't handle directory inputs for shadowing. The fix modifies the ShadowJar task to properly handle directory inputs by checking if a file is a directory before attempting to process it as an archive.

  • Restructured the file processing logic in ShadowJar.copy() to handle directories, AAR files, and regular archives separately
  • Added comprehensive test coverage for custom source set output shadowing
  • Updated changelog to document the fix

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar.kt Modified file processing logic to handle directory inputs properly
src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/JavaPluginsTest.kt Added test case for shadowing custom source set output with directories
docs/changes/README.md Added changelog entry for the regression fix

@Goooler Goooler enabled auto-merge (squash) August 8, 2025 03:35
@Goooler Goooler merged commit 8ca103c into main Aug 8, 2025
8 checks passed
@Goooler Goooler deleted the g/20250808/cant-use-dirs branch August 8, 2025 03:42
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.

Regression: Creating shadowJar fails when configurations contain directories (9.0.0)

2 participants