You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't re-add suppressed Gradle API to compileOnly configuration (#1422)
As part of Gradle's experiments with publishing an external Gradle API (gradle/gradle issue 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 issue 260.
* Add tests for checking presence of Gradle API in dependencies
* Clean up tests
* Less diff in configureJavaGradlePlugin
* Remove afterEvaluate
* Apply suggestions from code review
* Update changelog
* Try `named`
* Revert "Try `named`"
This reverts commit 0cae38e.
---------
Co-authored-by: Goooler <[email protected]>
// Remove the gradleApi so it isn't merged into the jar file.
105
106
// This is required because 'java-gradle-plugin' adds gradleApi() to the 'api' configuration.
106
107
// See https://github.com/gradle/gradle/blob/972c3e5c6ef990dd2190769c1ce31998a9402a79/subprojects/plugin-development/src/main/java/org/gradle/plugin/devel/plugins/JavaGradlePluginPlugin.java#L161.
0 commit comments