-
Notifications
You must be signed in to change notification settings - Fork 3
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Published pom leaks gradle-api dependency #89
Comments
This seems to be because the plugin adds the gradle-api dependency to the compileOnlyApi when using Gradle 6.7+ (see AddGradleApiDependencyToCompileOnlyApiConfiguration). The compileOnlyApi configuration exports compile dependencies. The compileOnly configuration does not. |
I remember changing to However, I think I see the problem. When the plugin is consumed, it will fetch dependencies of the I will add some tests to resolve only using the plugin marker and validate that we are pulling the Gradle API. Then, I will add configuration to the plugin marker. One thing to note, there is no need to add |
Here is a workaround:
|
The generated pom & module files leak the gradle-api jar as a dependency when used in a compileOnly configuration. These should not be exported. This behavior differs from the java-gradle-plugin plugin.
Gradle: 6.9.2
Plugin: 1.6.8
build.gradle using dev.gradleplugins.java-gradle-plugin
pom.xml using dev.gradleplugins.java-gradle-plugin
Observe how gradle-api is exported as a compile dependency. It should not be.
build.gradle using java-gradle-plugin
pom.xml using java-gradle-plugin
The text was updated successfully, but these errors were encountered: