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
Allow DerivedArtifact to expose a getExtension() #28969
Labels
Milestone
Comments
loosebazooka
changed the title
DerivedArtifact should expose a getExtension()
Allow DerivedArtifact to expose a getExtension()
Apr 25, 2024
This issue needs a decision from the team responsible for that area. They have been informed. Response time may vary. Relates to: |
ov7a
added
in:publishing-plugins
ivy-publish maven-publish
👋 team-triage
Issues that need to be triaged by a specific team
and removed
to-triage
labels
May 7, 2024
@loosebazooka do you have a workaround for now or would this unblock you? |
big-guy
removed
the
👋 team-triage
Issues that need to be triaged by a specific team
label
May 13, 2024
Yeah workaround exists. Plus I would have to be pretty backward compatible for now. This is just a request for a change in the future. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Expected Behavior
A signer alternative to pgp (like sigstore in this case) which uses an extension
.sigstore.json
should be able to publish with that extension when doing a maven publish (this is not supported without a bit of a hack).The PublicationInternal object could add the extension to the interface
interface DerivedArtifact { boolean shouldBePublished(); File create(); + String getExtension(); }
I also understand that we kinda need to access some of these internal APIs to make this happen from a 3rd party plugin.
Current Behavior (optional)
The extension is computed from the filename which means it's the last of
X.Y.Z
which in this case is.Z
instead of.Y.Z
. See code:gradle/platforms/software/maven/src/main/java/org/gradle/api/publish/maven/internal/artifact/DerivedMavenArtifact.java
Line 44 in ec838d8
So during publication of
my.jar.sigstore.json
, the maven publication generates a finished dervied object asmy.jar.json
(instead ofmy.jar.sigstore.json
)Context
Sigstore signatures are expected to use the final extension
.sigstore.json
. There is a workaround that can be done by explicitly setting the extension on the PublicationArtifact (which we do infact exploit), but the current interface for DerviedArtifact could make this less hacky.The text was updated successfully, but these errors were encountered: