This message was deleted.
# community-support
s
This message was deleted.
v
Iirc I usually configure it so that signing is required if it is a release verison but optional if it is a snapshot version. That way snapshot version will still be signed if the signatory is configured, but just not be done if it is not configured and it is a snapshot version.
t
That's what I have too, along with
useGpgCmd()
to use the GPG agent, and that configures a signatory IIUC, so there'll always be a signatory and signing wil always be performed , irrespective of
required
.
v
Maybe only call that method if the necessary things for signing are present or something like that? Alternatively, configure the GHA workflow to have the necessary signing configuration.
t
So, anyway, you'd lean towards conditional signature? Even though there's a difference in usage too? (publication was only used when… publishing –to an external repo–, and is now used for testing during the build; testing never needs signing)
v
What do you mean by "difference in usage"?
If you don't get the signatory not set when appropriate, you could maybe also disable the signing task when appropriate.
t
What do you mean by "difference in usage"?
Testing makes use of publishing but that's mainly an implementation detail to make the JARs accessible to the TestKit-driven builds, along with the dependency metadata. As long as I have a way to use the lib and processor libs in the test builds, I don't care whether that uses publishing or not (for this specific project, I could use an included build; because I don't have a test matrix with different Gradle versions; if that was the case, I couldn't do it as that would mean running the –included– build with various Gradle versions). So if reusing the existing publishing configuration breaks the workflow (by requiring signing), then maybe it just shouldn't be reused, as the goal is not to reuse it: it's just tentatively reused because it's already there.
v
Well, yeah, I guess separate publication should be fine too. Maybe even cleaner. I didn't create such a build yet, so I do not have practical experience with it.
t
Fwiw, the only issue with multiple publications AFAICT is that you then need to disable publication/repository combinations to decide what you publish where: https://docs.gradle.org/current/userguide/publishing_customization.html#sec:publishing_maven:conditional_publishing