Skip to content

Conversation

aSemy
Copy link
Contributor

@aSemy aSemy commented Oct 7, 2025

fix #20232

Context

Update AbstractMavenPublisher to check if each artifact requires checksum files.

Create MavenArtifactInternal as a common parent for AbstractMavenArtifact and SerializableMavenArtifact. It has a method, enableChecksumFileGeneration(). When derived artifacts (signatures) are added to a Maven publication (by the signing plugin), Gradle will disable checksum file generation for them.

Creating MavenArtifactInternal was necessary, otherwise it would have to be added to the existing common parent of AbstractMavenArtifact and SerializableMavenArtifact, PublicationInternal, which is also a parent for Ivy types. To keep the change small, this branch only modifies Maven publications.

Contributor Checklist

  • Review Contribution Guidelines.
  • Make sure that all commits are signed off to indicate that you agree to the terms of Developer Certificate of Origin.
  • Make sure all contributed code can be distributed under the terms of the Apache License 2.0, e.g. the code was written by yourself or the original code is licensed under a license compatible to Apache License 2.0.
  • Check "Allow edit from maintainers" option in pull request so that additional changes can be pushed by Gradle team.
  • Provide integration tests (under <subproject>/src/integTest) to verify changes from a user perspective.
  • Provide unit tests (under <subproject>/src/test) to verify logic.
  • Update User Guide, DSL Reference, and Javadoc for public-facing changes.
  • Ensure that tests pass sanity check: ./gradlew sanityCheck.
  • Ensure that tests pass locally: ./gradlew <changed-subproject>:quickTest.

Reviewing cheatsheet

Before merging the PR, comments starting with

  • ❌ ❓must be fixed
  • 🤔 💅 should be fixed
  • 💭 may be fixed
  • 🎉 celebrate happy things

Update `AbstractMavenPublisher` to check if each artifact requires checksum files.

Create `MavenArtifactInternal` as a common parent for `AbstractMavenArtifact` and `SerializableMavenArtifact`.
It has a method, `enableChecksumFileGeneration()`. When derived artifacts (signatures) are added to a Maven publication (by the signing plugin), Gradle will disable checksum file generation for them.

Creating `MavenArtifactInternal` was necessary, otherwise it would have to be added to the existing common parent of `AbstractMavenArtifact` and `SerializableMavenArtifact` - which is also a parent for Ivy types. To keep the change small, this branch only modifies Maven publications.

Signed-off-by: Adam <[email protected]>

gradle#20232
@bot-gradle bot-gradle added from:contributor PR by an external contributor to-triage labels Oct 7, 2025
@hegyibalint hegyibalint added in:publishing-plugins ivy-publish maven-publish and removed to-triage labels Oct 9, 2025
@hegyibalint
Copy link
Member

Thank you for your proposed contribution!

This PR has a valid DCO and tests. The relevant team for this area will confirm the design of the implementation choices.


Relevant parallel PR: #34032

@hegyibalint hegyibalint added the 👋 team-triage Issues that need to be triaged by a specific team label Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from:contributor PR by an external contributor in:publishing-plugins ivy-publish maven-publish 👋 team-triage Issues that need to be triaged by a specific team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stop publishing .asc.${checksums} to Central repository

3 participants