Skip to content

Don't re-add suppressed Gradle API to compileOnly configuration #1422

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

Merged

Conversation

Jonathing
Copy link
Contributor

@Jonathing Jonathing commented May 3, 2025

As part of Gradle's experiments with publishing an external Gradle API (gradle/gradle#29483), they are beginning to look at suppressing the local Gradle API dependency that is usually used when the java-gradle-plugin plugin is applied. Because of this, though, the current strategy that the Shadow plugin uses to move it from api to compileOnly doesn't check if it exists to begin with. This PR aims to solve that problem. I've added tests as needed.

Gradle's Plugin Publish plugin has a similar issue which I've gone into detail in gradle/plugin-portal-requests#260.


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

Copy link
Member

@Goooler Goooler left a comment

Choose a reason for hiding this comment

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

LGTM!

I'll merge this after feedback from gradle/plugin-portal-requests#260.

@Jonathing
Copy link
Contributor Author

Hell yeah

Goooler added 4 commits July 1, 2025 22:02
…ppressed-gradle-api

# Conflicts:
#	src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/JavaPluginTest.kt
This reverts commit 0cae38e.
@Goooler Goooler enabled auto-merge (squash) July 1, 2025 14:22
@Goooler Goooler merged commit de8ecf5 into GradleUp:main Jul 1, 2025
13 checks passed
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