Skip to content

Remove afterEvaluate when adding variants - #2056

Merged
Goooler merged 1 commit into
mainfrom
g/20260622/remove-after-evaluate-when-add-variants
Jun 22, 2026
Merged

Remove afterEvaluate when adding variants#2056
Goooler merged 1 commit into
mainfrom
g/20260622/remove-after-evaluate-when-add-variants

Conversation

@Goooler

@Goooler Goooler commented Jun 22, 2026

Copy link
Copy Markdown
Member

Follow up #1662 (comment).


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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 removes the afterEvaluate block previously used when conditionally adding the shadowRuntimeElements variant to the java software component, and records the change in the changelog.

Changes:

  • Switch variant inclusion logic from afterEvaluate to ConfigurationVariantDetails.skip() during variant configuration.
  • Keep the shadow component variant publishing behavior unchanged.
  • Add a changelog entry noting the removal of afterEvaluate for variant addition.

Reviewed changes

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

File Description
src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/ShadowJavaPlugin.kt Removes afterEvaluate for adding the shadowRuntimeElements variant to the java component and replaces it with variant.skip() logic.
docs/changes/README.md Adds an Unreleased changelog entry for the change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Goooler
Goooler merged commit 5454313 into main Jun 22, 2026
9 checks passed
@Goooler
Goooler deleted the g/20260622/remove-after-evaluate-when-add-variants branch June 22, 2026 03:31
@Goooler Goooler changed the title Remove afterEvaluate when adding variants Remove afterEvaluate when adding variants Jun 22, 2026
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.

2 participants