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

also setup test fixtures sources jar for Kotlin/JVM, suppress warnings #486

Merged
merged 3 commits into from Dec 29, 2022

Conversation

gabrielittner
Copy link
Collaborator

Forgot that Kotlin/JVM projects are configured separately from java/java-library when I added the workaround to publish sources for test fixtures. It is now applied to both of them.

Also added supressions for the following warnings that always appear when publishing a project with test fixtures, regardless of the sources. They happen because there is no concept like a test fixture dependency in Maven so it can't be reflected in the POM.

Maven publication 'maven' pom metadata warnings (silence with 'suppressPomMetadataWarningsFor(variant)'):
  - Variant testFixturesApiElements:
      - Declares capability :eithernet-test-fixtures:unspecified which cannot be mapped to Maven
  - Variant testFixturesRuntimeElements:
      - Declares capability :eithernet-test-fixtures:unspecified which cannot be mapped to Maven
These issues indicate information that is lost in the published 'pom' metadata file, which may be an issue if the published library is consumed by an old Gradle version or Apache Maven.
The 'module' metadata file, which is used by Gradle 6+ is not affected.

project.mavenPublications {
it.suppressPomMetadataWarningsFor("testFixturesApiElements")
it.suppressPomMetadataWarningsFor("testFixturesRuntimeElements")
it.suppressPomMetadataWarningsFor("testFixturesSourcesElements")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This last one isn't present in eithernet because it gets added by the it.withSourcesJar().published() above which didn't run on eithernet since it's a Kotlin project

@gabrielittner gabrielittner merged commit 925f5d2 into main Dec 29, 2022
@gabrielittner gabrielittner deleted the test-fixtures2 branch December 29, 2022 19:42
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.

None yet

2 participants