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

Apply legacy plugin last, and declare capabilities for old plugins #991

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jpenilla
Copy link
Contributor

@jpenilla jpenilla commented Sep 29, 2024

fixes #964 using the solution suggested by @ljacomet at #964 (comment)

Tested to fix the issue (bring behavior back to how it was before 8.3.1/with the old plugin), and to give an error when both the current and old plugin are on the classpath.

Something else that came to mind regarding the legacy plugin is that if someone puts the new plugin on the classpath, but then applies the legacy plugin id, nothing will happen, which could be confusing. But resolving that is likely better addressed in a separate PR (if at all).

> Could not resolve all files for configuration ':build-logic:compileClasspath'.
   > Could not resolve com.gradleup.shadow:shadow-gradle-plugin:8.3.3-SNAPSHOT.
     Required by:
         project :build-logic
      > Module 'com.gradleup.shadow:shadow-gradle-plugin' has been rejected:
           Cannot select module with conflict on capability 'com.github.johnrengelman:shadow:8.3.3-SNAPSHOT' also provided by [com.github.johnrengelman:shadow:8.1.1(apiElements)]
   > Could not resolve com.github.johnrengelman:shadow:8.1.1.
     Required by:
         project :build-logic
      > Module 'com.github.johnrengelman:shadow' has been rejected:
           Cannot select module with conflict on capability 'com.github.johnrengelman:shadow:8.1.1' also provided by [com.gradleup.shadow:shadow-gradle-plugin:8.3.3-SNAPSHOT(apiElements)]

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

@@ -45,3 +45,34 @@ tasks.withType<Javadoc>().configureEach {
it.addStringOption("Xdoclint:none", "-quiet")
}
}

configurations {
sequenceOf(
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
sequenceOf(
listOf(

@@ -3,6 +3,7 @@

## [Unreleased]

- Apply legacy plugin last, and declare capabilities for old plugins, fixes [#964](https://github.com/GradleUp/shadow/issues/964) ([#991](https://github.com/GradleUp/shadow/pull/991))
Copy link
Member

@Goooler Goooler Sep 29, 2024

Choose a reason for hiding this comment

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

Suggested change
- Apply legacy plugin last, and declare capabilities for old plugins, fixes [#964](https://github.com/GradleUp/shadow/issues/964) ([#991](https://github.com/GradleUp/shadow/pull/991))
**Fixed**
- Apply legacy plugin last, and declare capabilities for old plugins, fixes [#964](https://github.com/GradleUp/shadow/issues/964). ([#991](https://github.com/GradleUp/shadow/pull/991))

@Goooler
Copy link
Member

Goooler commented Sep 29, 2024

CC @ljacomet

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.

Legacy plugin application order breaks shadow detection logic updated for new id
2 participants