Skip to content

Advertise source jars for JVM-only libraries #4394

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
merged 1 commit into from
Apr 3, 2025

Conversation

dkhalanskyjb
Copy link
Collaborator

Original implementation:
https://github.com/vanniktech/gradle-maven-publish-plugin/blob/f22bd35c84c3df28700db4ca3de11d5b78a29fde/plugin/src/main/kotlin/com/vanniktech/maven/publish/Platform.kt#L472 Thanks, @vanniktech!

The issue with the replaced implementation is that it only packs the jar, without registering the publication variant. Checking the sources of java { withSourcesJar() }, we see the corresponding logic, but given that we can instead invoke it directly, no need to reimplement it.

Fixes #4112

Original implementation:
https://github.com/vanniktech/gradle-maven-publish-plugin/blob/f22bd35c84c3df28700db4ca3de11d5b78a29fde/plugin/src/main/kotlin/com/vanniktech/maven/publish/Platform.kt#L472
Thanks, @vanniktech!

The issue with the replaced implementation is that it only packs
the jar, without registering the publication variant.
Checking the sources of `java { withSourcesJar() }`, we see the
corresponding logic, but given that we can instead invoke it
directly, no need to reimplement it.

Fixes #4112
@dkhalanskyjb dkhalanskyjb requested a review from qwwdfsad March 25, 2025 11:56
Copy link
Member

@qwwdfsad qwwdfsad left a comment

Choose a reason for hiding this comment

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

Nice catch!

@dkhalanskyjb dkhalanskyjb merged commit e9b247e into develop Apr 3, 2025
1 check passed
@dkhalanskyjb dkhalanskyjb deleted the dkhalanskyjb/advertise-source-jars branch April 3, 2025 14:33
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